Oracle中存储过程的问题???
create or replace procedure myproc_3
as
cursor mysor is select * from emp for update;
begin
open mysor;
for i in mysor
loop
if i.deptno = 10 then
update emp set sal=(sal+500)* 3 where current of mysor;
elsif i.deptno = 20 then
update emp set sal=sal* 3 where current of mysor;
else
update emp set sal=sal-1000 where current of mysor;
end if ;
end loop;
close mysor;
end;
select * from emp;
begin
myproc_3;
end;
存储过程是成功 的,为什么运行的时候系统报错是,游标已经打开