v_order_id
v_amount
order_id
DECLARE v_order_id NUMBER; v_amount NUMBER(10,2) := 100; BEGIN v_order_id := v_order_id + 1; INSERT INTO order(order_id, order_value) VALUES (v_order_id, v_amount); COMMIT; EXCEPTION WHEN DUP_VAL_ON_INDEX THEN DBMS_OUTPUT.PUT_LINE ('Cannot insert record into the Order table as order_id already exists.'); WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE ('Cannot continue processing as error encountered.'); END;