Last value in a Table
-
how to find the last value in a Table . My table was designed by another person ..it doesnt have any Identity column .. It has only EMPname,Empaddress,EmpContactno. can any one pls tell me how to find the last value in the table Thanks in advance Regards Bino varghese
-
how to find the last value in a Table . My table was designed by another person ..it doesnt have any Identity column .. It has only EMPname,Empaddress,EmpContactno. can any one pls tell me how to find the last value in the table Thanks in advance Regards Bino varghese
you mean to say u want a last record of the Table...is that so...
-
you mean to say u want a last record of the Table...is that so...
if i m getting you correct so let me tell you there is no such way by which u can get the last row of the tabe u shuld be more specific abut ur query..but there is a way by which u can achieve ur task. select top 1 * from table order by somefield Hope it will work for you. Thanks and regards Aavesh Agaerwal
-
how to find the last value in a Table . My table was designed by another person ..it doesnt have any Identity column .. It has only EMPname,Empaddress,EmpContactno. can any one pls tell me how to find the last value in the table Thanks in advance Regards Bino varghese
Last value by what criteria?
-
Last value by what criteria?
-
hi all Thanks for ur reply.. If I order by I vl not get the last value in the table.. I want the last record in the table .
One of the fundamental principles of a relational database is that the physical order of rows and columns in the tuples (tables) is not important. http://en.wikipedia.org/wiki/Relational_database[^] If you need to extract data in a particular order, the data itself should provide the means of doing this. For instance, if you had an numeric EmployeeID field which was incremented every time a new employee joined the company then you could find the last value in your table by selecting the row of data with the highest EmployeeID value. You don't have any data items that you can use for this purpose in your table so you can't achieve this.
Paul Marfleet