declare
cursor c
is
select * from emp2 for update;
--v_temp c%rowtype;
begin
for v_temp in c loop
if(v_temp.sal < 2000) then
update emp2 set sal = sal * 2 where curre of c;
elsif (v_temp.sal = 5000) then
delete form emp2 where current of c;
end if;
end loop;
commit;
end;
plsq程序设计--可更新的游标
最新推荐文章于 2022-02-25 18:19:43 发布