OTHERS Exception

The OTHERS exception handles all exceptions:


SQL> BEGIN
  2     DBMS_OUTPUT.PUT_LINE(1 / 0);
  3  EXCEPTION
  4  WHEN OTHERS THEN
  5      DBMS_OUTPUT.PUT_LINE('An exception occurred');
  6  END;
  7  /
An exception occurred

PL/SQL procedure successfully completed.

SQL>
Home »
Oracle »
PL/SQL » 

Exceptions:
  1. Build-in Exceptions
  2. ZERO_DIVIDE Exception
  3. DUP_VAL_ON_INDEX Exception
  4. INVALID_NUMBER Exception
  5. OTHERS Exception
Related: