Quantcast
Channel: Find UR Codes » SQL Server
Viewing all articles
Browse latest Browse all 3

How to get last Record from a Table in SQL Server

$
0
0

Here ID is a integer with auto increment Value. It should be a Primary key.

SELECT * 
 FROM    TABLE
 WHERE   ID = (SELECT MAX(ID)  FROM TABLE)

Viewing all articles
Browse latest Browse all 3

Trending Articles