MSSQL Reseed the Identity to 0

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)
MSSQL Reseed the Identity to 0 MSSQL Reseed the Identity to 0 Reviewed by Edward Legaspi on Friday, October 22, 2010 Rating: 5

No comments:

Powered by Blogger.