A vmaxteamsalary 75000000 b bbpackaddplayer

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: SALARY := 75000000; B. BB_PACK.ADD_PLAYER. V_MAX_TEAM_SALARY := 75000000; C. BB_PACK.V_MAX_TEAM_SALARY := 75000000; D. This variable cannot be assigned a value from outside the package. Answer: C QUESTION 21: Which two statements about the overloading feature of packages are true? (Choose two) Actualtests.com - The Power of Knowing 1Z0-101 A. Only local or packaged sub programs can be overloaded. B. Overloading allows different functions with the same name that differ only in their return types. C. Overloading allows different subprograms with the same number, type and order of the parameter. D. Overloading allows different subprograms with the same name and same number or type of the parameters. E. Overloading allows different subprograms with the same name but different in either number or type or order of parameter. Answer: A, E QUESTION 22: CREATE OR REPLACE manag emps IS Tax_rate CONSTANT NUMBER(5,2):= . 28:, V_id NUMBER; PROCEDURE insert_emp(p-deptno NUMBER,p-sal NUMBER); PROCEDURE delete_emp; PROCEDURE update_emp: FUNCTION calc_tax(o_sal NUMBER) RETURN NUMBER; END manag_emps; / CREATE REPLACE PACKAGE BODY manage_emps IS BEGIN Update emp. SET sal=|sal+p-raise_amt)+sal WHERE empno= v_id; END; PROCEDURE insert_emp (p_deptno NUMBER, p-sal NUMBER) IS BEGIN INSERT INTO emp(empno, deptno,sal) VALUES(v_id, p_deptno, p_sal); END insert emp; PROCEDURE delete_emp IS BEGIN DELETE FROM emp WHERE empno=v_id END delete_emp; Actualtests.com - The Power of Knowing 1Z0-101 PROCEDURE. Update_emp. IS V_sal NUMBER (10,2); V_raise NUMBER(10,2); BEGIN SELECT Sal INTO v_sal FROM emp WHERE empno=v_id; IF v_sal<500 THEN V_raise:=0. 05; ELSIF v_sal<1000 THEN V_raise:=0. 07; ELSE V_raise:=0. 04 END IF; Update_sal(v_raise); END update_emp. FUNCTION calc_tax (p_sal NUMBER) RETURN NUMBER IS BEGIN RETURN p_sal* tax-rate; END calc_tax; END MANAGE_emp; / What is the name of the private procedure in the package? A. CALC_TAX B. INSERT_EMP C. UPDATE_SAL D. DELETE_EMP E. UPDATE_EMP F. MANAGE_EMP Answer: C QUESTION 23: CREATE OR REPLACE TRIGGER update_emp AFTER UPDATE ON emp BEGIN INSERT INTO audit_table (who, audited) VALUES(USER, SYSDATE); END; Actualtests.com - The Power of Knowing 1Z0-101 You issue an update command on the EMP table that results in changing ten rows. How many rows are inserted into the AUDIT_TABLE? A. 1 B. 10 C. none D. Value equal to the number of rows in the emp table Answer: A QUESTION 24: All users currently have the INSERT privileges on the PLAYER table. You want only your users to insert into this table using the ADD_PLAYER procedure. Which two actions must you take? (Choose two) A. GRANT SELECT ON ADD_PLAYER TO PUBLIC; B. GRANT EXECUTE ON ADD_PLAYER TO PUBLIC; C. GRANT INSERT ON PLAYER TO PUBLIC; D. GRANT EXECUTE, INSERT ON ADD_PLAYER TO PUBLIC; E. REVOKE INSERT ON PLAYER FROM PUBLIC; Answer: B, E QUESTION 25: Which Oracle supply package allows you to run jobs at use defined times? A. DBMS_JOB B. DBMS_RUN C. DBMS_PIPE D. DBMS_SQL Answer: A QUESTION 26: You need to drop a table from within a stored procedure. How do you implement this? A. You cannot drop a table from a stored procedure. B. Use the DROP command in the procedure to drop the table. C. Use the DBMS_DDL packaged routines in the procedure to drop the table. D. Use the DBMS_SQL packaged routines in the procedure to drop the table. E. Use the DBMS_DROP packaged routines in the procedure to drop the table. Actualtests.com - The Power of Knowing 1Z0-101 Answer: D QUESTION 27: Which data dictionary views gives you the names and the source code of all the procedures that you have created? A. USER_SOURCE B. USER_OBJECTS C. USER_PROCEDURES D. USER_SUBPROGRAMS Answer: A QUESTION 28: 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 DEFAULT4, V_HITS IN NUMBER) IS BEGIN UPDATE PLAYER_BAT_STAT SET ADD_BAT=ADD_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 IN 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); Actualtests.com - The Power of Knowing 1Z0-101 END ADD_PLAYER; END BB_PACK; Which kind of packaged variables is V_MAX_TEAM_SALARY? A. PRIVATE B. PUBLIC C. IN D. OUT Answer: B QUESTION 29: Examine this trigger. CREATE OR REPLACE TRIGGER UPD_TEAM_SALARY AFTER INSERT OR UPDATE OR DELETE ON PLAYER FOR EACH ROW BEGIN UPDATE TEAM SET TOT_SALARY=TOT_SALARY+:NEW SALARY. WHERE ID=:NEW:T...
View Full Document

Ask a homework question - tutors are online