Sunday, April 16, 2017

Get the last inserted id

You can get last inserted id in SQL Server

  DECLARE @Last_Insterted_id integer=0       
 SELECT @Last_Insterted_id=IDENT_CURRENT('tablename')    

No comments:

Post a Comment