plsq程序设计--可更新的游标

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;

你可能感兴趣的:(sql,C++,c,C#)