Examine the following trigger:
CREATE OR REPLACE TRIGGER Emp_count
AFTER DELETE ON Employee
FOR EACH ROW
DECLARE
n INTEGER;
BEGIN
SELECT COUNT(*) INTO n FROM employee;
DMBS_OUTPUT.PUT_LINE( 'There are now' || n || 'employees');
END;
This trigger results in an error after this SQL statement is
entered: DELETE FROM Employee WHERE Empno = 7499;
How should the error be corrected?
Correct Answer: Change the trigger to a statement-level trigger by removing FOR EACH ROW
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Oracle PL/Sql 10g MCQ Questions