Click here to Skip to main content
15,902,908 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Please reply soon. thnx in advance.
Posted
Comments
Maciej Los 15-Apr-15 2:17am    
What you mean "lart 2 records"? Is there any Primary Key in the table?

1 solution

the last 2, are the same as the first 2, sorted backwards

SQL
SELECT TOP(2) * FROM yourTable ORDER BY yourindex DESC
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900