Reset Identity Column of SQL Table

To reset the identity column field of table use the following code. Just replace the name of the table you want to reset.
There is another way of resetting the table back to its original state using truncate but this is not applicable for tables with foreign key constraints.


DBCC CHECKIDENT('[Table_Name]', RESEED, 0)

Comments

Popular Posts