--将数据复制到临时表
select * into #aclist from aclist
--删除数据表
drop table aclist
--创建数据表(并设置标识列)
create table aclist(id int identity(1,1),[date] datetime,version nvarchar(6),[class] nvarchar(10),actitle nvarchar(50),acdetail nvarchar(max),author nvarchar(50))
--设置标识列允许插入
set identity_insert aclist on
--将数据从临时表转移过来
insert into aclist(id,[date],version,[class],actitle,acdetail,author)
select id,[date],version,[class],actitle,acdetail,author from #aclist
--关闭标识列插入
set identity_insert aclist off