开发者

SQL Server - reset identity field [duplicate]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜