Showing posts with label IDENTITY. Show all posts
Showing posts with label IDENTITY. Show all posts

Monday, 13 December 2010

SQL Server: basic functions (part 8) - @@IDENTITY

   


In this post I will introduce you a very tricky and useful function called @@IDENTITY. The function returns the last inserted identity value. As you may already know, the identity column in a Sql Server table is a numeric column that auto increments when a new value is inserted in the table itself. To put it simply, it is the ID column in your table. Now, what is the practical use of @@IDENTITY?