SCOPE_IDENTITY() vs @@IDENTITY – 1:0
@@IDENTITY returns the most recently created identity for your current connection, not necessarily the identity for the recently added row in a table. Always use SCOPE_IDENTITY() to return the identity of the recently added row.

Leave a Reply