oracle block code example
Example: oracle block
set serveroutput on;
DECLARE
v_result NUMBER;
BEGIN
v_result := 1 / 0;
DBMS_OUTPUT.PUT_LINE( v_result );
EXCEPTION
WHEN ZERO_DIVIDE THEN
DBMS_OUTPUT.PUT_LINE( SQLERRM );
END;
set serveroutput on;
DECLARE
v_result NUMBER;
BEGIN
v_result := 1 / 0;
DBMS_OUTPUT.PUT_LINE( v_result );
EXCEPTION
WHEN ZERO_DIVIDE THEN
DBMS_OUTPUT.PUT_LINE( SQLERRM );
END;