How to find specify row value in SQL
I have a table it's name is table1 , in it 3 column is specified , column name is id, name, date if in name column three are three same name like abc, abc, abc add id is a primary key, how to get second last name and date in this table. table may be contain lot of records.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Adil Ansari149 reputationPosted Aug 30, 2012, 4:53 AM EDT
Please note: This way you will get the second last row (name, date). Incase if you need 3rd last you need to increase the 'red' number to 2 and so on......
Hope I answer your question
SELECT TOP 1 * FROM [Table1]