i have a table contain 1000 of records. I need to display last row of the table.
please let me know how to do it in SQL. I tried all Select statement but could not get it. I can count total rows with Select Count(*) from Table; but how to get the last row.
What do you mean by 'last'? SQL does not define the order that data is stored in a table. If you have a Datestamp field, or a serial number field then you could use something like:
Select Top 1 myName, myID from myTable Order by myID DESC
See the TOP predicate in SQL books on line, downloaded from: