create or replace
procedure find_emp_info (
p_emp_info out emp%rowtype,
p_empno in emp.empno%type default 7839
)
is
p_emp_info emp%rowtype;
begin
select * into emp_info
from emp
where empno =p_empno;
exception
when no_data_fount then
dbms_output.put_line( 'enter employee number not exists');
when others then
dbms_output.put_line('ERROR OCCURS ') ;
RAISE_APPLICATION_ERROR (-20003,SQLCODE||CHR(10)||sqlerrm);
end find_emp_info ;
/
PLS-00410:不允许RECORD,TABLE或参数列表中的重复字段
为什么在上面的代码中出现此错误
@Alex提到您声明一个p_emp_info
可以删除的局部变量时,有两个错误。
您正在使用的异常no_data_fount
必须是no_data_found
。
create or replace
procedure find_emp_info (
p_emp_info out emp%rowtype,
p_empno in emp.empno%type default 7839
)
is
begin
select * into p_emp_info
from emp
where empno =p_empno;
exception
when no_data_found then
dbms_output.put_line( 'enter employee number not exists');
when others then
dbms_output.put_line('ERROR OCCURS ') ;
RAISE_APPLICATION_ERROR (-20003,SQLCODE||CHR(10)||sqlerrm);
end find_emp_info ;
/
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句