各位大神幫忙看一下哪里有問題
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;
/
2019-10-10
多了個if
2019-08-26
elsif后面多了個if
2019-08-25
是emp.job,不是emp.ejob