SQL>
SQL> set serveroutput on
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: ' || SQLERRM);
5 DBMS_OUTPUT.PUT_LINE('SQLERRM(-1): ' || SQLERRM(-1));
6 END;
7 /
SQLERRM(0): ORA-0000: normal, successful completion
SQLERRM(100): ORA-01403: no data found
SQLERRM: ORA-0000: normal, successful completion
SQLERRM(-1): ORA-00001: unique constraint (.) violated
PL/SQL procedure successfully completed.
SQL>
SQL>