Hi All,
I am new to this forum
I created a trigger, but it's not working.
DECLARE
v_width INTEGER;
v_height INTEGER := 0;
v_area INTEGER := 6;
BEGIN
v_width := v_area / v_height;
DBMS_OUTPUT.PUT_LINE('v_width = ' || v_width);
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE('Division by zero');
END;
/
However I always get this error
ERROR at line 1:
ORA-01476: divisor is equal to zero
ORA-06512: at line 7
I can't debug it . I need to handle it in the right way , all exceptions should be handled.