D you need to issue the showerrors command in the sql

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: eed to issue the SHOWERRORS command in the SQL Plus environment to see the errors. E. YOU need to issue the display errors command in the SQL Plus environment to see the errors. Answer: D QUESTION 13: Which statement about the local dependent object is TRUE? A. They are on different nodes. B. They are in a different database. C. They are on the same node in the same database. D. They are on the same node in a different database. Answer: C Actualtests.com - The Power of Knowing 1Z0-101 QUESTION 14: You need to create a stored procedure, which deletes rows from a table. The name of the table from which the rows are to be deleted is unknown until run time. Which method do you implement while creating such a procedure? A. Use SQL command delete in the procedure to delete the rows. B. Use DBMS_SQL packaged routines in the procedure to delete the rows. C. Use DBMS_DML packaged routines in the procedure to delete the rows. D. Use DBMSDELETE packaged routines in the procedure to delete the rows. E. You cannot have a delete statement without providing a table name before compile time. Answer: B QUESTION 15: Under which situation do you create a server side procedure? A. When the procedure contains no SQL statements. B. When the procedure contains no PL/SQL commands. C. When the procedure needs to be used by many client applications accessing several remote databases. D. When the procedure needs to be used by many users accessing the same schema objects on a local database. Answer: D QUESTION 16: Examine this procedure CREATE OR REPLACE PROCEDURE ADD_PLAYER (V_ID IN NUMBER, V_LAST_NAME VARCHER2) IS BEGIN INSERT INTO PLAYER(ID,LAST_NAME). VALUES(V_ID,V_LAST_NAME); COMMIT; END; This procedure must invoke the UPD-STAT procedure and pass a parameter. Which statement will successfully invoke this procedure? A. EXECUTE UPD_BAT_STAT(V_ID); B. UPD_BAT_STAT(V_ID); C. RUN UPD_BAT_STAT(V_ID); Actualtests.com - The Power of Knowing 1Z0-101 D. START UPD_BAT_STAT(V_ID); Answer: B QUESTION 17: Examine this function CREATE OR REPLACE FUNCTION CALC_PLAYER_AVG (V_ID in PLAYER_BAT_STAT. PLAYER_ID%TYPE) RETURN NUMBER IS V_AVG NUMBER; SELECTS HITS/AT_BATS INTO V_AVG FROM PLAYER_BAT_STAT WHERE PLAYER_ID_V_ID; RETURN(V_AVG); END; This function must be moved to a package. Which additional statement must be added to the function to allow you to continue using the function in the group by the clause of a select statement? A. PRAGMA RESTRICT_REFERENCES (CALC_PLAYER_AVG, WNDS, WNPS); B. PRAGMA RESTRICT_REFERENCES (CALC_PLAYER_AVG, WNPS); C. PRAGMA RESTRICT_REFERENCES (CALC_PLAYER_AVG, RNPS, WNPS); D. PRAGMA RESTRICT_REFERENCES (CALC_PLAYER_AVG, ALLOW_GROUP_BY); Answer: A QUESTION 18: Which code successfully calculates tax? A. CREATE OR REPLACE PROCEDURE calc (p_no IN NUMBER) RETURN tax IS V_sal NUMBER; Tax NUMBER; BEGIN SELECT sal INTO v_sal FROM emp WHERE EMPNO=p_no; Tax:=v_sal * 0. 05; END; Actualtests.com - The Power of Knowing 1Z0-101 B. CREATE OR REPLACE FUNCTION calctax(p_no NUMBER) RETURN NUMBER IS V_sal NUMBER; BEGIN SELECT sal INTO v_sal FROM emp WHERE empno =p_no; RETURN(v_sal* 0. 05); END; C. CRETAE OR REPLACE FUNCTION calctax(p_no NUMBER) RETURN NUMBER IS V_sal NUMBER; Tax NUMBER; BEGIN SELECT sal INTO v_sal FROM emp WHERE empno =p_no; Tax:=v_sal * 0. 05; END; D. CREATE OR REPLACE FUNCTION calctax(p_no NUMBER)IS V_sal NUMBER; Tax NUMBER; BEGIN SELECT sal INTO v_sal FROM emp WHERE empno =p_no; Tax :=v_sal * 0. 05; RETURN(tax); END; Answer: B QUESTION 19: The programmer view developed a procedure ACCOUNT_TRANSACTION left organization. You were assigned a task to modify this procedure. YOU want to find all the program units invoking the ACCOUNT_TRANSACTION procedure. How can you find this information? A. Query the USER_SOURCE data dictionary view. B. Query the USER_PROCEDURES data dictionary view. C. Query the USER_DEPENDENCIES data dictionary views. D. Set the SQL Plus environment variable trade code=true and run the ACCOUNT_TRANSACTION procedure. E. Set the SQL Plus environment variable DEPENDENCIES=TRUE and run the Account_Transaction procedure. Actualtests.com - The Power of Knowing 1Z0-101 Answer: C QUESTION 20: Examine this package. CREATE OR REPLACE PACKAGE BB_PACK IS V_MAX_TEAM_SALARY NUMBER(12,2); PROCEDURE ADD_PLAYER(V_ID NUMBER,V_LAST_NAME VARCHER2,V_SALARY NUMBER); END BB_PACK; / CREATE OR REPLACE PACKAGE BODY BB_PACK IS PROCEDURE UPD_PLAYER_STAT (V_ID IN NUMBER,V_AB_IN NUMBER DEFAULT4,V_HITS IN NUMBER) IS BEGIN UPDATE PLAYER_BAT_STAT SET AT_BATS+V_AB, HITS=HITS+V_HITS WHERE PLAYER_ID=V_ID; COMMIT; END UPD_PLAYER_STAT; PROCEDURE ADD_PLAYER (V_ID IN NUMBER,V_LAST_NAME VARCHER2,V_SALARY NUMBER) IS BEGIN INSERT INTO PLAYER(ID,LAST_NAME,SALARY); UPD_PLAYER_STAT(V_ID,0,0); END ADD PLAYER; END BB_PACK; Which statement successfully assigns $75000000 to the V_MAX_TEAM_SALARY variable from within a stand alone procedure? A. V_MAX_TEAM_...
View Full Document

This document was uploaded on 03/08/2014.

Ask a homework question - tutors are online