Get last inserted ID in sql server

SELECT IDENT_CURRENT(‘tablename’)
  1. It returns the last IDENTITY value produced in a table, 
  2. IDENT_CURRENT is limited to a specified table.
  3. IDENT_CURRENT returns the identity value generated for a specific table.
Reference: Muthukumar (http://nadarmuthukumar.blogspot.in/), SqlAuthority

0 comments:

Twitter Delicious Facebook Digg Stumbleupon Favorites More