Reseed the Identity Value on a SQL Server Table

12/3/2013 1:35:24 AM

If you need to delete data from a SQL Server table and wish you reseed the Id value (usually your primary key), the following will do that.

--set to 0 and next insert will be 1
DBCC CHECKIDENT (TheTableToReseed, reseed, 0)