2010-11-21
delete tb where id>100DBCC CHECKIDENT (tb, RESEED, 1)DBCC CHECKIDENT (tb, RESEED)--其结果将 tb 表的自增种子设置为当前表里标识列的最大值--再次增加数据就会继续那个数字了--实测--建立测试环境IF OBJECT_ID(tb) IS NOT NULL DROP TABLE tbGOCREATE TABLE tb( id int identity, code varchar(10), CONSTRAINT PK_TB PRIMARY KEY (id))GO--插入测试数据declare @i ints...