oracle plsql 自定义异常
发布时间:2021-01-24 04:55 所属栏目:[站长百科] 来源:网络整理
导读:set serveroutput onDECLAREcursor cemp is select ename from emp where deptno=50;pename emp.ename%type;--自定义异常no_emp_found exception;beginopen cemp;fetch cemp into pename;if cemp%notfound then raise no_emp_found;end if;close cemp;exce
set serveroutput on DECLARE cursor cemp is select ename from emp where deptno=50; pename emp.ename%type; --自定义异常 no_emp_found exception; begin open cemp; fetch cemp into pename; if cemp%notfound then raise no_emp_found; end if; close cemp; exception when no_emp_found then dbms_output.put_line(‘自定义异常‘); end; 【免责声明】本站内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。 |
相关内容
推荐文章
热点阅读