I know Scope_Identity(), Identity(), @@Identity, and Ident_Current() all get the value of the identity column, but I woul
To clarify the problem with @@Identity:
For instance, if you insert a table and that table has triggers doing inserts, @@Identity will return the id from the insert in the trigger (a log_id or something), while scope_identity() will return the id from the insert in the original table.
So if you don't have any triggers, scope_identity() and @@identity will return the same value. If you have triggers, you need to think about what value you'd like.