MCQs > IT & Programming > Oracle PL/Sql 10g > 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?

Oracle PL/Sql 10g MCQs

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?

Answer

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

Oracle PL/Sql 10g Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More Oracle PL/Sql 10g MCQ Questions

search

Oracle PL/Sql 10g Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it