Multiple choice technology databases

Examine this procedure: CREATE OR REPLACE PROCEDURE UPD_BAT_STAT (V_ID IN NUMBER DEFAULT 10, V_AB IN NUMBER DEFAULT 4) IS BEGIN UPDATE PLAYER_BAT_STAT SET AT_BATS = AT_BATS + V_AB WHERE PLAYER_ID = V_ID; COMMIT; END; Which two statements will successfully invoke this procedure in SQL *Plus? (Choose two)

  1. a) EXECUTE UPD_BAT_STAT;

  2. b) EXECUTE UPD_BAT_STAT(V_AB=>10, V_ID=>31);

  3. c) EXECUTE UPD_BAT_STAT(31, 'FOUR', 'TWO');

  4. d) UPD_BAT_STAT(V_AB=>10, V_ID=>31);

  5. e) RUN UPD_BAT_STAT;

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

Option A works because both parameters have DEFAULT values, so calling with no arguments uses the defaults. Option B is correct - named notation (V_AB=>10, V_ID=>31) explicitly specifies which parameter gets which value. Option C is wrong - too many arguments and wrong data types. Option D is wrong for SQL*Plus (needs EXECUTE keyword). Option E is wrong - RUN is for PL/SQL blocks, not stored procedures. Named notation is particularly useful when you want to skip default parameters.