Home > Forum > Sql Server > How to get last 3 records in sql server?

How to get last 3 records in sql server?

by Thamil   on Sep 30, 2013   Category: Sql Server  |  Views: 1943    |  Points: 5   |  Gold 
  Reply


In my table 100 records there I need lost 3 records only how to solve it.


Thanks,
dinesh

Question posted on behalf of dinesh

Bookmark and Share:
 
  User Reply  | Ask a question  |   Reply 
  Re :How to get last 3 records in sql server?   
by Thamil
on Sep 30 2013 12:14PM
Points : 10
Gold 
Hello dinesh,

Please use below query to get last 3 records from the table, here im using customer table and make it desc order

SELECT TOP 3 * FROM dbo.tblCustomer order by CustID Desc

Recent Post

Latest Posts

1 3D model and 2D View New! Forum