请教函数编译错误 create or replace function my_fun(eno number,name out varchar2,num1 in number,num2 in out number,)
return varchar2
is
v_result number(10);
begin
select ename into name from emp where empno=eno;
return name;
v_result :=num1+num2;
num2 :=v_result;
exception
when no_data_found then
dbms_output.put_line('员工号不存在');
end;
/
------解决方案-------------------- 错误很明显:
create or replace function my_fun(eno number,name out varchar2,num1 in number,num2 in out number,)
eno number 是输入还是输出参数?你没有写啊? ------解决方案-------------------- create or replace function my_fun(eno number,name out varchar2,num1 in number,num2 in out number,)
逗号? ------解决方案-------------------- 去掉