SQLERRM function. : SQLERRM « PL SQL « Oracle PL / SQL






SQLERRM function.

    
SQL>
SQL> set serveroutput on
SQL>
SQL> BEGIN
  2    DBMS_OUTPUT.PUT_LINE('SQLERRM(0): ' || SQLERRM(0));
  3    DBMS_OUTPUT.PUT_LINE('SQLERRM(100): ' || SQLERRM(100));
  4    DBMS_OUTPUT.PUT_LINE('SQLERRM(10): ' || SQLERRM(10));
  5    DBMS_OUTPUT.PUT_LINE('SQLERRM: ' || SQLERRM);
  6    DBMS_OUTPUT.PUT_LINE('SQLERRM(-1): ' || SQLERRM(-1));
  7    DBMS_OUTPUT.PUT_LINE('SQLERRM(-54): ' || SQLERRM(-54));
  8  END;
  9  /
SQLERRM(0): ORA-0000: normal, successful completion
SQLERRM(100): ORA-01403: no data found
SQLERRM(10):  -10: non-ORACLE exception
SQLERRM: ORA-0000: normal, successful completion
SQLERRM(-1): ORA-00001: unique constraint (.) violated
SQLERRM(-54): ORA-00054: resource busy and acquire with NOWAIT specified

PL/SQL procedure successfully completed.

SQL>
SQL>

   
    
    
  








Related examples in the same category

1.SQLERRM function returns the error message associated with the most recently raised error exception
2.sqlerrm(sql%bulk_exceptions(i).error_code)
3.Error code and message
4.Error code: sql%bulk_exceptions(i).error_code
5.Trim the error message and then output
6.SQLERRM has the error message
7.Reference sql%bulk_exceptions(i).error_index