set serveroutput on
declare
cursor c1 is select empno,ejob from emp;
peno emp.empno%type;
pjob emp.ejob%type;
begin
open c1;
loop
fetch c1 into peno,pjob;
exit WHEN c1%notfound;
if pjob='PRESIDENT' then update emp set sal=sal+100 where empno=peno;
elsif
if pjob='MANAGER' then update emp set sal=sal+200 where empno=peno;
else
update emp set sal=sal+200 where peno=empno;
end if;
end loop;
close c1;
end;
/
多了个if
elsif后面多了个if
是emp.job,不是emp.ejob