set serveroutput on;
create or replace procedure query_employee
(eno number,name1 out varchar2,salary out number
)
is 
  
begin
  select ename,sal into name1,salary from emp
     where empno=eno;
exception
  when no_data_found then
     raise_application_error(-20000.'该雇员不存在');
end;

解决方案 »

  1.   

    raise_application_error(-20000.'该雇员不存在'); 
    这里应该是逗号
      

  2.   

     raise_application_error(-20000.'该雇员不存在');
    应该是逗号吧
     
      

  3.   

    一般报错时,要仔细看清误提示的内容
    如果用sqlplus编译,用show error查看错误内容
    如果用pl/sql developer工具,直view相应存储过程下面就会显示相应错误,光标可定位到相应的行上