Examine this package:
CREATE OR REPLACE PACKAGE BB_PACK
IS
V_MAX_TEM_SALARY NUMBER(12,2);
PROCEDURE ADD_PLAYER (V_ID IN NUMBER, V_LAST_NAME
VACHAR 2,V_SALARY NUMBER);
END BB_PACk;
/
CREATE OR REPLACE PACKAGE BODY BB_PACK
IS
V_PLAYER_AVG NUMBER84,3);
PROCEDURE UPD_PLAYER_STAT
(V_ID IN NUMBER, V_AB IN NUMBER DEFAULT 4, V_HITS IN NUMBER) IS
BEGIN
UPDATE PLAYER_BAT_STAT
SET AT_BATS = AT_BATS + V_AB,
HITS = HITS + V_HITS
WHERE PLAYER_ID=V_ID;
COMMIT;
VALIDATE_PLAYER_STAT(V_ID);
END UPD_PLAYER_STAT;
PROCEDURE ADD_PLAYER
(V_ID IN NUMBER, V_LAST_NAME VARCHAR2, V_SALARY NUMBERI) IS
BEGIN
INSERT INTO PLAYER (ID,LAST_NAME, SALARY)
VALUES(V_ID,V_LAST_NAME,V_SALARY);
UPD_PLAYER_STAT(V_ID,0,0);
END ADD_PLAYER;
END BB_PACK;
If you add an IF statement to the ADD_PLAYER procedure which additional step must you perform?
r A Recompile the ADD PLAYER procedure
Recompile both the BB PACK specification and body
A.
Recompile the ADD_PLAYER procedure
B.
Recompile both the BB_PACK specification and body
C.
Recompile the BB_PACK specification
D.
Recompile the BB_PACK body
Explanation:
The only correct option is to ALTER the package body which will cause the package body to recompile.
Incorrect AnswersA: This procedure is part of the f the BB_PACK Body and it can’t be compiled separately.
B: The package specification is not referenced by the package body, therefore it is not necessary to recompile the package specification. Only the package body requires recompiling.
C: It is not necessary to recompile the package specification because it is not referenced by the package body