我想帮助我解决一个我无法理解 msdn 文档的问题。如果我有以下 sql 代码:
declare C1 cursor for select * from tableA
open C1
fetch next from C1 into @a, @b..
while @@fetch_status = 0
.. do something very time consuming for each row
fetch next from C1 into @a, @b..
end
close c1
tableA 何时锁定更新?在游标声明期间?在打开期间,在获取期间?还是从开到关?
谢谢