ITPub博客

首页 > 数据库 > Oracle > oracle 存储过程游标中处理并记录异常

oracle 存储过程游标中处理并记录异常

原创 Oracle 作者:studywell 时间:2017-04-11 16:01:28 0 删除 编辑

游标中遇到异常,记录到日志表,继续执行下一个,不跳出游标;

 exception
      when others then
        v_sqlcode := sqlcode;
        v_sqlerrm := sqlerrm;
        dbms_output.put_line(sqlerrm);
        insert into hz_log values (systimestamp, v_sqlerrm, v_dblink);
        commit;


这都忘了,再记记。

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

请登录后发表评论 登录
全部评论

注册时间:2014-03-04

  • 博文量
    307
  • 访问量
    535409