ORACLE 预定义异常
例子:
create or replace procedure test(id in varchar2, name out varchar2) is
begin
DBMS_OUTPUT.PUT_LINE('进程开始运行');
select ename into name from emp where empno = id;
DBMS_OUTPUT.PUT_LINE('NANE:' || name);
exception
when NO_DA TA_FOUND then
DBMS_OUTPUT.PUT_LINE('没有找到相关数据');
end test;
begin
DBMS_OUTPUT.PUT_LINE('进程开始运行');
select ename into name from emp where empno = id;
DBMS_OUTPUT.PUT_LINE('NANE:' || name);
exception
when NO_DA
DBMS_OUTPUT.PUT_LINE('没有找到相关数据');
end test;

Comments
Post a Comment