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)
A.
EXECUTE UPD_BAT_STAT;
B.
EXECUTE UPD_BAT_STAT(V_AB=>10, V_ID=>31);
C.
EXECUTE UPD_BAT_STAT(31, ‘FOUR’,’TWO’);
D.
UPD_BAT_STAT(V_AB=>10, V_ID=>31);
E.
RUN UPD_BAT_STAT;
Explanation:
A: This is the correct syntax for invoking a function from SQL *Plus. Actual parameters are not
needed since the procedure has default values defined for each formal parameter . The
EXECUTE or EXEC statement is used to invoke an independent procedure from SQL*Plus. The
EXECUTE or EXEC keyword is followed by the name of the procedure and arguments.
B: This is the correct syntax for invoking this function using positional notation.
Incorrect Answers:
E: Run is not a valid command for invoking a procedure.