DBCC CHECKIDENT SQL Server 2005 DBCC CHECKIDENT - Check and/or reseed the current identity value for a table.
Syntax
DBCC CHECKIDENT
( 'table'
[ , { NORESEED | { RESEED [ , new_reseed_value ] } } ]
) [WITH NO_INFOMSGS]
Key:
NORESEED - The current identity value should not be changed.
RESEED - Change the identity value.
new_reseed_value - The new seed value to be used for the identity column.
WITH NO_INFOMSGS - Suppresses all information messages.
Example
-- Reset the current identity value
USE MyDatabase;
GO
DBCC CHECKIDENT ('MySchema.MyTable', RESEED, 5000);
GO |