星空网 > 软件开发 > 数据库

oracle自定义异常

1.弹出错误框:

示例代码:

declare v_count number;begin  select count(*) into v_count from dept; if v_count < 10 then   raise_application_error(-20001,'数量小于10'); end if;end;

执行结果:

oracle自定义异常

 

2.控制台显示:

示例代码:

declare v_count number;my_exp exception;begin  select count(*) into v_count from dept; if v_count < 10 then   raise my_exp; end if; exception   when my_exp then    dbms_output.put_line('数量小于10');  when others then    dbms_output.put_line('其他异常');end;

执行结果:

oracle自定义异常

 




原标题:oracle自定义异常

关键词:oracle

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

账号关联因素:https://www.goluckyvip.com/tag/7224.html
权威链接:https://www.goluckyvip.com/tag/7225.html
开海外账户有什么好处:https://www.goluckyvip.com/tag/72251.html
正规美原油开户:https://www.goluckyvip.com/tag/72254.html
美国股票开户要多少钱:https://www.goluckyvip.com/tag/72258.html
利基市场开发:https://www.goluckyvip.com/tag/7226.html
23点聊电商:新质生产力加速数字贸易发展 卓尔智联集团实现营收利润双增长 :https://www.kjdsnews.com/a/1836411.html
南京浦口都有什么好玩的地方 南京浦口都有什么好玩的地方推荐:https://www.vstour.cn/a/363180.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流