Multiple choice technology databases

Examine this procedure: CREATE OR REPLACE PROCEDURE ADD_PLAYER (V_ID IN NUMBER, V_LAST_NAME VARCHAR2) IS BEGIN INSERT INTO PLAYER (ID, LAST_NAME) VALUES (V_ID, V_LAST_NAME); COMMIT; END; This procedure must invoke the UPD_BAT_STAT procedure and pass a parameter. Which statement, when added to the above procedure will successfully invoke the UPD_BAT_STAT procedure?

  1. EXECUTE UPD_BAT_STAT(V_ID);

  2. UPD_BAT_STAT(V_ID);

  3. RUN UPD_BAT_STAT(V_ID);

  4. START UPD_BAT_STAT(V_ID);

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

In PL/SQL, a procedure is invoked by name with parameters in parentheses, without any command keyword. EXECUTE is SQL*Plus syntax, not PL/SQL. RUN and START are SQL*Plus commands for executing scripts, not for calling procedures. The correct syntax is simply the procedure name with arguments.

AI explanation

To successfully invoke the UPD_BAT_STAT procedure and pass a parameter, you need to use the correct syntax. Let's go through each option to determine which statement should be added to the procedure:

Option A) EXECUTE UPD_BAT_STAT(V_ID) - This option is incorrect because EXECUTE is not a valid keyword to invoke a procedure in PL/SQL.

Option B) UPD_BAT_STAT(V_ID) - This option is correct because it uses the correct syntax to invoke the UPD_BAT_STAT procedure and pass the V_ID parameter.

Option C) RUN UPD_BAT_STAT(V_ID) - This option is incorrect because RUN is not a valid keyword to invoke a procedure in PL/SQL.

Option D) START UPD_BAT_STAT(V_ID) - This option is incorrect because START is not a valid keyword to invoke a procedure in PL/SQL.

The correct answer is Option B) UPD_BAT_STAT(V_ID). This option is correct because it uses the correct syntax to invoke the UPD_BAT_STAT procedure and pass the V_ID parameter.