开发者

SQL Server - reset identity field [duplicate]

开发者 https://www.devze.com 2022-12-17 10:17 出处:网络
This question already has answers here: Reset AutoIncrement in SQL Server after Delete (14 answers) Closed 9 years ago.
This question already has answers here: Reset AutoIncrement in SQL Server after Delete (14 answers) Closed 9 years ago.

I have a table with a identity column. I need to reset that identity column from zero. What should i开发者_C百科 do for this.


Use DBCC CHECKIDENT:

DBCC CHECKIDENT(<tablename>, RESEED, 0);
0

精彩评论

暂无评论...
验证码 换一张
取 消