Tuesday, July 26, 2011

Reset Identity Value of a Primary Key in SQL Server

Guys, If we do lots of Manual delete and insert of rows in any table then the identity column values gets very weird.
If we want to reseet our Identity column to zero then here is the SQL Server TSQL to do the same.

DBCC CHECKIDENT('EngConfig_FormFactor', RESEED, 0)

Try it and enjoy.

No comments:

Post a Comment