SQL>
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
2 width INTEGER;
3 height INTEGER := 2;
4 area INTEGER;
5 BEGIN
6 area := 6;
7 width := area / height;
8 DBMS_OUTPUT.PUT_LINE('width = ' || width);
9 EXCEPTION
10 WHEN ZERO_DIVIDE THEN
11 DBMS_OUTPUT.PUT_LINE('Division by zero');
12 END;
13 /
width = 3
PL/SQL procedure successfully completed.
SQL>
SQL>
SQL>