top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Difference Between SCOPE_IDENTITY() and @@IDENTITY

0 votes
237 views
Difference Between SCOPE_IDENTITY() and @@IDENTITY
posted Sep 28, 2015 by Sathaybama

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

@@IDENTITY: Returns the last identity values that were generated in any table in the current session. @@IDENTITY is not limited to a specific scope.
SCOPE_IDENTITY(): Returns the last identity values that are generated in any table in the current session. SCOPE_IDENTITY returns values inserted only within the current scope.

answer Sep 28, 2015 by Shivaranjini
...