How to reset the identity column of a SQL table

How to reset the identity column of a SQL table

To reset the value of the identity column in a Microsoft SQL table run the below query:

DBCC CHECKIDENT (TableName, RESEED, 0)

You will need to change TableName to the name of the table you wish to reset. This query will reset the identity column to 0, meaning the next row will have the identity 1. You can change 0 to whatever identity you wish to start from.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top