| Start |
|---|
SCOPE_IDENTITY() This will return the most recently added identity value produced on the same connection, within the current scope. In this case, 1, for the first row in the dbo.person table. |
| Last Inserted Identity |
IDENT_CURRENT('tablename') This will select the most recently-added identity value on the selected table, regardless of connection or scope. |
@@IDENTITY and MAX(ID) The last two SELECT statements values are the same. |
Read Article
https://develop.horje.com/learn/1434/reference