Wednesday, 12 August 2015

Reset Identity Column Value In Sql Server Table

How To Reset Identity Column In Sql Server Table To Start Auto Increment Or Seed From Desired Number

If we delete All data from Sql Server table having Identity Column with Identity Seed as 1 and insert new data Identity column value doesn't get reset and it starts from last number.

If table were having 10 records and we insert new records after deleting all records in table, identity column would start from 11 if identity seed is 1.

we can use below mentioned command to reset Identity Column.


DBCC CHECKIDENT('YouTableName', RESEED, 0)