Identity columns are kind of a helpful feature. But there might be times when you would want to change the value of an identity column.Guess what, SQL server does not allow it. I have not come across a way by which you can update the identity column but there sure is a way to insert one.
SET Identity_Insert <TableName> ON
Now you will be able to insert a value into the identity column. Once done just revert the above statement to what follows to avoid unnecessary inserts:
SET Identity_Insert <TableName> OFF
Filed under: Microsoft, SQL Server, Technical