The actualtestscom the power of knowing 1z0 147

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: tables, rather than defining the data type of each variable in the program unit. The - The Power of Knowing 1Z0-147 %ROWTYPE and %TYPE attributes provide you the flexibility to change the data types of the columns of the table without having to modify the data types specified in the program unit. QUESTION 42: Which two does the INSTEAD OF clause in a trigger identify? (Choose two) A. The view associated with the trigger. B. The table associated with the trigger. C. The event associated with the trigger. D. The package associated with the trigger. E. The statement level or for each row association to the trigger. Answer: A,C Explanation: Answer A is correct. You must specify the View. INSTEAD OF TRIGGERS are created on views to allow DML statements on an on-updateable view. Answer C is correct. An INSETED OF Trigger can fire for all three Triggering Events (INSERT, UPDATE and UPDATE). Answer B is incorrect INSTEAD of Triggers can only be created for Views they can't be created on Tables. Answer D is incorrect. You can't call a package. Answer E is incorrect. INSTEAD OF TRIGGERS must always fire FOR EACH ROW; STATEMENT Level Triggers are not valid for Views QUESTION 43: Examine this package: CREATE OR REPLACE PACKAGE manage_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 (p_sal NUMBER) RETURN NUMBER; END manage_emps; / CREATE OR REPLACE PACKAGE BODY manage_emps IS - The Power of Knowing 1Z0-147 PROCEDURE update_sal (p_raise_amt NUMBER) IS BEGIN UPDATE emp SET sal = (sal * p_raise_emt) + sal WHERE empno = v_id; END; PROCEDURE insert_emp (p_deptno NUMBER, p_sal NUMBER) IS BEGIN INSERT INTO emp(empno, deptno, sal) VALYES(v_id, p_depntno, p_sal); END insert_emp; PROCEDURE delete_emp IS BEGIN DELETE FROM emp WHERE empno = v_id; END delete_emp; PROCEDURE update_emp IS v_sal NUMBER(10, 2); v_raise NUMBER(10, 2); BEGIN SELECT...
View Full Document

Ask a homework question - tutors are online