How to Reseed the Identity to 0 in Mssql

There are times when you want to reset the identity back to 0 before inserting records into the database.

To do that execute the following script on master database:

dbcc checkident('TableName', RESEED,0)

0 Comments

Post a Comment

Post a Comment (0)

Previous Post Next Post
NERV Open Source
Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.