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; --释放游标