*********关于cursor for update的问题*************
在cursor没有用过update,不知道下面为什么出错,请帮忙!
--------------------------------------------------
create or replace procedure test
as
v_sal number;
cursor c1 is
select sal from emp
for update of sal;
begin
open c1;
loop
fetch c1 into v_sal;
exit when c1%notfound;
update emp set sal=sal+100 where current of c1;
commit;
end loop;
close c1;
commit;
end;