Multiple choice technology databases

CREATE OR REPLACE PROCEDURE find_cpt (v_movie_id {Argument Mode} NUMBER, v_cost_per_ticket {argument mode} NUMBER) IS BEGIN IF v_cost_per_ticket > 8.5 THEN SELECT cost_per_ticket INTO v_cost_per_ticket FROM gross_receipt WHERE movie_id = v_movie_id; END IF; END; Which mode should be used for V_COST_PER_TICKET?

  1. IN OUT

  2. IN

  3. OUT

  4. RETURN

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The procedure receives v_cost_per_ticket as input (IN) to compare against 8.5, but it may also need to return the fetched value back to the caller (OUT). IN OUT mode allows both passing a value in and returning the modified value. IN alone wouldn't return the fetched result.