Empty table data and reset IDENTITY columns

后端 未结 2 2033
别那么骄傲
别那么骄傲 2021-02-19 04:30

I created a database in SQL Server with a couple of tables. I ran some tests and now am ready to deploy my solution, problem is, there is all sorts of data in the tables. I want

2条回答
  •  遇见更好的自我
    2021-02-19 04:42

    From: http://www.howtogeek.com/howto/database/reset-identity-column-value-in-sql-server/

    To set the value of the next ID to be 1, I can use this command:

    DBCC CHECKIDENT (orders, RESEED, 0)
    

提交回复
热议问题