Create or replace procedure disp(pEMPLASTNAME varchar2)
IS
Row employee%rowtype;
begin
select * into row from employee where EMPLASTNAME=’pEMPLASTNAME’ ;
dbms_output.put_line('Name: '||Row.EMPID||' '|| Row.EMPNAME);
End;
/
BEGIN
disp(‘Mark’);
END;
/
您好,我试图使用存储过程显示表中的数据。姓氏通过存储过程作为参数传递,并且在执行时,存储过程应显示具有姓氏的所有行。这是我得到的错误;请帮忙! : -通过存储过程显示数据
SQL> BEGIN
disp('Mark');
END;
/
BEGIN
*
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "TEST.DISP", line 5
ORA-06512: at line 2
谢谢,但现在我得到这个错误: - –
ORA-01422:精确获取回报更多比要求的行数 –
@Nidhin_toms,这意味着不止一名员工的姓氏像'Mark'。这个pl/sql块只允许返回一行。 – Sebas