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 »
Oracle »
PL/SQL »
Exceptions:
- Build-in Exceptions
- ZERO_DIVIDE Exception
- DUP_VAL_ON_INDEX Exception
- INVALID_NUMBER Exception
- OTHERS Exception
Related: