Saturday, September 5, 2009

How to reset MS SQL Server IDENTITY

If the table is new create you can use this to reset the identity
DBCC CHECKIDENT (yourtable, reseed, seed_value)

If you delete that data in the table u can use
DBCC CHECKIDENT (yourtable, reseed, 0)