Unformatted text preview: N Emp_tab
FOR EACH ROW
DBMS_OUTPUT.PUT_LINE(' There are now ' || a ||
This trigger results in an error after this SQL statement is entered:
DELETE FROM Emp_tab WHERE Empno = 7499;
How do you correct the error?
A. Change the trigger type to a BEFORE DELETE.
B. Take out the COUNT function because it is not allowed in a trigger.
C. Remove the DBMS_OUTPUT statement because it is not allowed in a trigger.
D. Change the trigger to a statement-level trigger by removing FOR EACH ROW.
A mutating table is a table against which a data manipulation statement has been issued
corresponding trigger on the DML statement is reading from the same table, at the same
Mutating tables are not valid for statement triggers because statement triggers fire only
once for each
event and allow the process to complete before the trigger is actually fired. Row triggers
cause a table to mutate because row triggers fire for each row. To correct this problem
you change the trigger to a Statement-Level Trigger by removing FOR EACH ROW or
by specifying FOR EACH STATEMENT.
A. This will still result in an error and it will not achieve the intended result.
B. You may use the COUNT function in a Trigger.
C. The DBMS_OUTPUT statement is allowed in a Trigger . Actualtests.com - The Power of Knowing 1Z0-147
QUESTION 54: What is true about stored procedures?
A. A stored procedure uses the DELCLARE keyword in the procedure specification to
declare formal parameters.
A stored procedure is named PL/SQL block with at least one parameter declaration in the
C. A stored procedure must have at least one executable statement in the procedure body.
D. A stored procedure uses the DECLARE keyword in the procedure body to declare
The executable section must contain at least one executable statement. You
View Full Document
- Fall '09
- Stored procedure, Incorrect Answers