Rather than "bogus value", I'd say "unexpected value". I guess it's a matter of semantics, but bogus implies to me that the value has no validity at all, which isn't true. More directly, I'd say it will return the value of the most recently created identity value in the SQL Server session, which may or may not be the identity value of the table about which you are concerned.
Agreed, @@IDENTITY should NOT be suggested as a blanket solution for SQL Server.
Agreed, @@IDENTITY should NOT be suggested as a blanket solution for SQL Server.

Leave a comment