新聞中心
create or replace procedure pr_test_def_exception
尼元陽ssl適用于網(wǎng)站、小程序/APP、API接口等需要進行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為創(chuàng)新互聯(lián)公司的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18980820575(備注:SSL證書合作)期待與您的合作!
as
v_error varchar2(200);
v_cnt varchar2(200);
v_sal number;
EX_RESOURCE_BUSY EXCEPTION;
PRAGMA EXCEPTION_INIT(RESOURCE_BUSY, -54);
begin
--另開會話,執(zhí)行l(wèi)ock table scott.bonus in exclusive mode
select sal into v_sal from scott.bonus where ename='majunjie' for update nowait;
update scott.bonus set sal=2000 where ename='majunjie';
dbms_output.put_line(v_cnt);
exception
when RESOURCE_BUSY then
v_error := sqlerrm;
dbms_output.put_line(v_error);--ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
when others then
v_error := sqlerrm;
dbms_output.put_line(111);
end;
文章名稱:自定義異常--老是忘記exception
轉(zhuǎn)載注明:http://www.dlmjj.cn/article/ijeghd.html