ITPub博客

首页 > 数据库 > Oracle > oracle中的exception和循环

oracle中的exception和循环

原创 Oracle 作者:masheng0925 时间:2015-10-09 22:15:41 0 删除 编辑
declare
begin
  for i in 1..10 loop
  begin
    if i=5 then
        insert into mas values(i,'mas');
    else
        insert into mas values(i,i);
    end if;
    exception when others then
        dbms_output.put_line('exception');
         --raise_application_error(-20001,'test');
    end;
  end loop;
exception when others then
    dbms_output.put_line('exception');
end;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30201626/viewspace-1813633/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: EBS DBA指南
请登录后发表评论 登录
全部评论

注册时间:2015-04-11

  • 博文量
    43
  • 访问量
    44267