ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle exception

oracle exception

原创 Linux操作系统 作者:loncai 时间:2008-08-24 19:10:55 0 删除 编辑
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/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: PARTITION
请登录后发表评论 登录
全部评论

注册时间:2008-08-24

  • 博文量
    7
  • 访问量
    6993