关于 cursor scroll keyset 的问题,不是很明白,烦请各位解释一下
有一 Table “CurTest”字段 “NodeID”為索引
declare Cur_keyset cursor scroll keyset for
SELECT NodeID, NodeName, ParentID FROM CurTest
declare @id decimal (18,0),@name varchar(50),@pid decimal (18,0),@point int;
open Cur_keyset
set @point=1
fetch absolute @point from Cur_keyset into @id,@name,@pid
set @point=2
while @@fetch_status =0
begin
print cast(@id as varchar)+'……'+@name+'……'+ cast(@pid as varchar)
/*
update web.CurTest
set NodeName ='wwwwww'
where NodeID >4
*/
declare @i int
set @i=1
while @i<1000000 --只是延長時間,讓其它用戶更新 CurTest
begin
set @i=@i+1
end
fetch RELATIVE @point from Cur_keyset into @id,@name,@pid
print @@fetch_status
end
close Cur_keyset
deallocate Cur_keyset
我想讓游標 Cur_keyset 顯示已作修改的內容
結果失敗
我看了 N 遍幫助文件﹐始終沒看沒明白
勞駕各位了﹐謝謝﹗﹗