当我尝试编译此 plsql 时,我不断收到此错误消息:
'F_checksal is not a procedure or is undefined'
这是代码:
declare
e_high_increase EXCEPTION;
old_sal NUMBER;
function f_checkSal(i_sal number,i_old_sal IN OUT NUMBER) return VARCHAR2 is
begin
if((i_sal/old_sal)*100>300) then
raise e_high_increase;
else
return 'yes';
end if;
exception when e_high_increase then
insert into t_logerror(error_tx) values ('this is user exception');
dbms_output.put_line('this is user exception');
return 'No';
end;
begin
select sal into old_sal FROM emp where empno=153;
f_checksal(30000,old_sal);
update emp set sal=30000 where empno=153;
end;