You can use the update statement to change the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ize a BFILE column by associating it with a physical file in the server file system. You can use the UPDATE statement to change the reference target of the BFILE. A BFILE can be initialized to NULL and updated later by using the BFILENAME function. C. DBMS_LOB.FILEEXISTS function to find if the file exits on the server QUESTION 45: Examine this package: CREATE OR REPLACE PACKAGE BB_PACK IS V_MAX_TEAM_SALARY NUMBER(12,2); PROCEDURE ADD_PLAYER(V_ID IN NUMBER, V_LAST_NAME VARCHAR2, V_SALARY NUMBER); END BB_PACK; / CREATE OR REPLACE PACKAGE BODY BB_PACK IS V_PLAYER_AVG NUMBER(4,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 NUMBER) 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 / Which statement will successfully assign .333 to the V_PLAYER_AVG variable from a procedure outside the package? - The Power of Knowing 1Z0-147 A. V_PLAYER_AVG := .333; B. BB_PACK.UPD_PLAYER_STAT.V_PLAYER_AVG := .333; C. BB_PACK.V_PLAYER_AVG := .333; D. This variable cannot be assigned a value from outside of the package. Answer: D Explanation: Constructs declared and defined in the package body are private constructs and they can't be invoked outside of the package. Incorrect Answers A. Even if this variable was declared in the package specification, this is the wrong syntax for referencing a global variable from outside the package. B. Nice try but this is wrong, you can't reference a package that is defined in the package body from outside of the package. C. This is the correct syntax for assigning a value to a global variable but this is wrong because the variable was not declared in the package specification. QUESTION 46: Examine this code: CREATE OR REPLACE PACKAGE comm_package IS g_comm NUMBER := 10; PROCEDURE reset_comm(p_comm IN NUMBER); END comm_pa...
View Full Document

This document was uploaded on 03/08/2014.

Ask a homework question - tutors are online