There are 3 of different ways for fetching the updated identity column value.
IDENT_CURRENT
SCOPE_IDENTITY
and @@IDENTITY
each of the above have a similar role to play except for some subtle differences.
One common tasks of theirs is that they return values inserted into IDENTITY columns.
IDENT_CURRENT is not limited by scope and session; it is limited to a specified table. IDENT_CURRENT returns the value generated for a specific table in any session and any scope.
SCOPE_IDENTITY and @@IDENTITY will return last identity values generated in any table in the current session. However, SCOPE_IDENTITY returns values inserted only within the current scope; @@IDENTITY is not limited to a specific scope.
for details refer
http://msdn.microsoft.com/en-us/library/aa259185(SQL.80).aspx
IDENT_CURRENT
SCOPE_IDENTITY
and @@IDENTITY
each of the above have a similar role to play except for some subtle differences.
One common tasks of theirs is that they return values inserted into IDENTITY columns.
IDENT_CURRENT is not limited by scope and session; it is limited to a specified table. IDENT_CURRENT returns the value generated for a specific table in any session and any scope.
SCOPE_IDENTITY and @@IDENTITY will return last identity values generated in any table in the current session. However, SCOPE_IDENTITY returns values inserted only within the current scope; @@IDENTITY is not limited to a specific scope.
for details refer
http://msdn.microsoft.com/en-us/library/aa259185(SQL.80).aspx