Which statement, when added to the above procedure will successfully invoke the UPD_BAT_STAT procedure?

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 APD_BAT_STAT procedure and pass a parameter.
Which statement, when added to the above procedure will successfully invoke the UPD_BAT_STAT procedure?

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 APD_BAT_STAT procedure and pass a parameter.
Which statement, when added to the above procedure will successfully invoke the UPD_BAT_STAT procedure?

A.
EXECUTE UPD_BAT_STAT(V_ID);

B.
UPD_BAT_STAT(V_ID);

C.
RUN UPD_BAT_STAT(V_ID);

D.
START UPD_BAT_STAT(V_ID);

Explanation:
Correct Answers
Answer B
When invoking a Procedure from within another procedure you omit the EXECUTE. You call the Procedure by specifying the Procedure Name and the argument list and a semi-colon
Incorrect Answers:

A: You omit the EXECUTE when calling a procedure from within a procedure.
C: RUN is not valid for invoking a procedure
D: Is invalid for invoking a procedure



Leave a Reply 0

Your email address will not be published. Required fields are marked *