首页 > Linux操作系统 > Linux操作系统 > oracle exception
oracle exception create or replace procedure p1(i_empno int)is v_empno int; e_no_row exception; begin v_empno :=i_empno; update kingstar.emp set empno = 3 where empno = i_empno; if sql%notfound then raise e_no_row; end if; commit; exception when e_no_row then raise_application_error(-20999,'无法找到记录');--error range 20000 - 20999 end; |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11079750/viewspace-433215/ ,如需转载,请注明出处,否则将追究法律责任。