【sqlserver】游标
declare c cursor fast_forward/* read only forward noly*/ for --申明路由 select xx,xxx,xx from tabname; open c --打开路由 fetch next [ [Next|prior|Frist|Last|Absoute n|Relative n ] from c into @xxxx,@xxxx; --跳到下一个指针并且复制到变量中 while @@fetch_status = 0 begin xxxxx Update bigorder Set UserId='123' Where Current of orderNum_03_cursor--修改当前 fetch next from c into xxxxxxxx; end close c; --关闭游标 deallocate c; --释放游标
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

更多精彩