----允许对系统表进行更新 ----取消标识列标记 --插入id=8001-8003的行 ----恢复标识列标记 ----重新设置标识的起始值 ----禁止对系统表进行更新SQL Server修改标识列方法
exec sp_configure ‘allow updates‘,1
reconfigure with override
GO
update syscolumns set colstat = 0 where id = object_id(‘tablename‘) and colstat = 1
GO
...
update syscolumns set colstat = 1 where id = object_id(‘tablename‘) and name = ‘标识列名称‘
DBCC CHECKIDENT (表名称, RESEED, 10003)
exec sp_configure ‘allow updates‘,0
reconfigure with override