I hava one Item_Details Table.I want to move directly on the last record and i want to get the value of the first colume.
Printable View
I hava one Item_Details Table.I want to move directly on the last record and i want to get the value of the first colume.
If you want to find the last row in a table in a DB which has a IDENTITY column which named as ID then use the following.
Or else you can use TOP 1 on the table with ordered data in descending order.Quote:
SELECT * FROM TABLE WHERE ID = (SELECT MAX(ID) FROM TABLE)
Is that you want to know?