Introduction:
In this article I will explain how to write query to get last inserted record id in sql server or last modified record id value in SQL Server.
In this article I will explain how to write query to get last inserted record id in sql server or last modified record id value in SQL Server.
Description:
In
previous post I explained how to set identity property or auto increment column in data
table and many articles relating to SQL
Server.
Now I will explain how to write a query to get last inserted record id value or
last modifies record id in SQL
Server.
Generally if we create data table we will set identity column or auto increment column in table to increase column id value
automatically whenever new record inserted in SQL Server. In one situation I got
requirement like to get last inserted record Id from data table in SQL Server.