男人.No boy no cry

彪悍的人生,不需要解釋...

导航

IDENTITY_INSERT 怎么设置

Posted on 2005-08-24 10:22  Piccolo Goo  阅读(9205)  评论(0)    收藏  举报
用如下语句:
select * into #table0 from ckht where hth='04HSA04EX089J'
update #table0 set hth='04HSA111111111'
set identity_insert ckht on
insert into ckht select * from #table0
set identity_insert ckht off
显示错误提示为:
仅当使用了列的列表,并且 IDENTITY_INSERT 为 ON 时,才能在表 'ckht' 中为标识列指定显式值。
这个到底要怎么设置呀
--错误提示已经够清楚了.
select * into #table0 from ckht where hth='04HSA04EX089J'
update #table0 set hth='04HSA111111111'
set identity_insert ckht on
insert into ckht(写上字段列表)
select * from #table0
set identity_insert ckht off