有兩種方法:
方法1: truncate table 你的表名 --這樣不但將數據刪除,而且可以重新置位identity屬性的字段。 方法2: delete from 你的表名 dbcc checkident(你的表名,reseed,0) --重新置位identity屬性的字段,讓其下個值從1開始 |
让自增列复位
最新推荐文章于 2020-07-12 13:02:30 发布
有兩種方法:
方法1: truncate table 你的表名 --這樣不但將數據刪除,而且可以重新置位identity屬性的字段。 方法2: delete from 你的表名 dbcc checkident(你的表名,reseed,0) --重新置位identity屬性的字段,讓其下個值從1開始 |