Oracle详细错误信息可以精确到哪一行(dbms_utility.format_error_backtrace)
以下案例:第7行会报no_data_found 错误

declare x_out_mesg varchar2(2000); v_api_name varchar2(200); --程序名称 v_head_id number; begin select pha.po_header_id into v_head_id from po_headers_all pha where pha.po_header_id = 7881234567; exception when others then x_out_mesg := v_api_name || ': ' || dbms_utility.format_error_stack || ' ' || dbms_utility.format_error_backtrace || ',' || sqlerrm; dbms_output.put_line(x_out_mesg); end;

本文来自博客园,作者:Iven_lin,转载请注明原文链接:https://www.cnblogs.com/ivenlin/p/18121497
浙公网安备 33010602011771号