DBCC--CHECKIDENT


检查活或重置自增键的标识值,可以使用NORESEED 来检查当前标识值和标识列在表中的最大值。 如果当前标识值与表中数据冲突或希望将标识值重置到一个较小的值时,可以只用RESEED 来设置

DBCC CHECKIDENT 
( 
        table_name
        [ , { NORESEED | { RESEED [ , new_reseed_value ] } } ]
)
[ WITH NO_INFOMSGS ]


NORESEED 
Specifies that the current identity value should not be changed.

RESEED 
Specifies that the current identity value should be changed.

new_reseed_value 
Is the new value to use as the current value of the identity column.

WITH NO_INFOMSGS
Suppresses all informational messages.

 
 

原文地址:https://www.cnblogs.com/TeyGao/p/3518770.html