deallocate cur
declare cur cursor scroll
for select yy from tt
open cur
declare @Smallid varchar(50)
fetch from cur
--while @@fetch_status=0
--begin
update tt set yy=755 where current of cur
/* fetch next from cur
update tt set yy=55 where current of cur
fetch next from cur
update tt set yy=555 where current of cur
fetch next from cur
update tt set yy=555555 where current of cur
*/
--end
close cur
deallocate cur
SQL游标操作示例
4万+

被折叠的 条评论
为什么被折叠?



