+ -
当前位置:首页 → 问答吧 → 更新数据时,提示 不支持 声明光标 SQL构造或语句

更新数据时,提示 不支持 声明光标 SQL构造或语句

时间:2010-12-14

来源:互联网

declare @i int
set @i=1
while (@i<=1000)
begin
UPDATE table1 SET id = (SELECT c.autoid FROM table1 as a join table2 as b on a.a=b.b join table3 as c on b.user=c.user  where   a.id=@i) where id=@i
set @i=@i+1
end

我想用上面的语句来批量更新某个表的值,但是出现 "不支持 声明光标 SQL构造或语句"这样的错误,请问是什么原因呢

[ 本帖最后由 yinblue 于 2010-12-14 11:26 编辑 ]

作者: yinblue   发布时间: 2010-12-14

大家知道是什么原因吗

作者: yinblue   发布时间: 2010-12-14