SQL @@IDENTITY

The SQL Server @@IDENTITY is a System Function that returns the last inserted identity value. You can use this @@IDENTITY after an INSERT, INTO SELECT, BULK INSERT, or SELECT INTO Statement is completed to find the last generated identity value. And, if no insert operation happens, it will return NULL. How to write or use … Read more