Sunday, April 4, 2010

Differences between SCOPE_IDENTITY , @@IDENTITY and IDENT_CURRENT

  • @@identity returns the last identity value generated in this session but any scope
  • scope_identity() returns the last identity value generated in this session and this scope
  • ident_current() returns the last identity value generated for a particular table in any session and any scope

No comments:

Post a Comment