PL SQL Programming Oracle PLSQL Tutorial

The ZERO_DIVIDE exception is raised when an attempt is made to divide a number by zero.

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>