Oracle PL/SQL Tutorial/SQL PLUS Session Environment/plsql line
Версия от 13:45, 26 мая 2010; (обсуждение)
$$plsql_line and $$plsql_unit
SQL>
SQL> CREATE OR REPLACE PROCEDURE calculate_totals
2 IS
3 BEGIN
4 RAISE VALUE_ERROR;
5 EXCEPTION
6 WHEN OTHERS
7 THEN
8 DBMS_OUTPUT.put_line("Current line number " || $$plsql_line);
9 DBMS_OUTPUT.put_line("Failed in program "|| $$plsql_unit);
10 END calculate_totals;
11 /
Procedure created.
SQL>
SQL> EXEC calculate_totals;
PL/SQL procedure successfully completed.
SQL>