删除某个或几个记录后,标记列重新自动增长问题

来源:互联网 发布:legacy安装ubuntu 编辑:程序博客网 时间:2024/06/03 15:17
存储过程如下:
create procedure manu_del @id int
as
delete from 刊物信息表 where ID=@id
select * into a from 刊物信息表
truncate table 刊物信息表
set identity_insert a on
insert into 刊物信息表 select * from a
drop table a
go
检查语法出现如下错误信息:
“当使用了列的列表,并且IDENTITY_INSERT为ON时,才能在‘刊物信息表’中为标识显示值。”

我设计的刊物信息表结构中的ID为标记列
0 0
原创粉丝点击