DBCC CHECKIDENT Sets Identity to 0

前端 未结 10 1335
长发绾君心
长发绾君心 2020-12-07 21:55

I\'m using this code to reset the identity on a table:

DBCC CHECKIDENT(\'TableName\', RESEED, 0)

This works fine most of the time, with the f

10条回答
  •  误落风尘
    2020-12-07 22:22

    I did this as an experiment to reset the value to 0 as I want my first identity column to be 0 and it's working.

    dbcc CHECKIDENT(MOVIE,RESEED,0)
    dbcc CHECKIDENT(MOVIE,RESEED,-1)
    DBCC CHECKIDENT(MOVIE,NORESEED)
    

提交回复
热议问题