ZERO_DIVIDE Exception
The ZERO_DIVIDE
exception happens when dividing a number by zero.
SQL> BEGIN
2 DBMS_OUTPUT.PUT_LINE(1 / 0);
3 EXCEPTION
4 WHEN ZERO_DIVIDE THEN
5 DBMS_OUTPUT.PUT_LINE('Division by zero');
6 END;
7 /
Division by zero
PL/SQL procedure successfully completed.
SQL>
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: