检查活或重置自增键的标识值,可以使用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.

 
 

相关文章:

  • 2022-12-23
  • 2021-07-02
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-11
  • 2022-02-18
  • 2021-12-30
相关资源
相似解决方案