存储过程打印出错行号只支持Oracle10g及以上版本

存储过程打印出错行号只支持Oracle10g及以上版本


--存储过程打印出错行号只支持Oracle10g及以上版本
begin
   do something;
exception when others then                                                 
    dbms_output.put_line(sqlcode);--Oracle内置变量,错误代码
    dbms_output.put_line(sqlerrm);--Oracle内置变量,错误详细描述
    dbms_output.put_line(dbms_utility.format_error_backtrace());--出错行号
end;

猜你喜欢

转载自amwuyygy.iteye.com/blog/2002418
今日推荐