Ways of getting Last Inserted record

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 988
SELECT @@IDENTITY
SELECT SCOPE_IDENTITY()
SELECT IDENT_CURRENT('TableName')
SELECT MAX(primeryleyid) FROM TableName
SELECT TOP 1 primeryleyid FROM TableName ORDER BY primeryleyid DESC

Comments or Responses

Login to post response