Posts
33
Comments
186
Trackbacks
0
Tuesday, March 5, 2013
Reseed Identity column in SQL Server
Use the below SQL command to reset the seed on the identity column -

DBCC CHECKIDENT('TABLE_NAME', RESEED, 'RESEED_VALUE')

The following example forces the current identity value in the AddressTypeID column in the AddressType table to a value of 10. Because the table has existing rows, the next row inserted will use 11 as the value, that is, the new current increment value defined for the column value plus 1.

DBCC CHECKIDENT ("Person.AddressType", RESEED, 10);


Posted On Tuesday, March 5, 2013 5:25 PM | Comments (3)