Get identity of inserted row
- @@IDENTITY returns the last identity value generated for any table in the current session, across all scopes.
- SCOPE_IDENTITY() returns the last identity value generated for any table in the current session and the current scope.
- IDENT_CURRENT('tableName') returns the last identity value generated for a specific table in any session and any scope.