Quantcast
Channel: Geekswithblogs.net
Viewing all articles
Browse latest Browse all 6441

Reseed Identity column in SQL Server

$
0
0

Originally posted on: http://geekswithblogs.net/Vipin/archive/2013/03/05/reseed-identity-column-in-sql-server.aspx

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);



Viewing all articles
Browse latest Browse all 6441

Latest Images

Trending Articles



Latest Images