Lab 17.2 Types of Triggers
Lab ObjectivesAfter this Lab, you will be able to: |
In the previous lab of this chapter, you encountered the term row trigger. A row trigger is fired as many times as there are rows affected by the triggering statement. When the statement FOR EACH ROW is present in the CREATE TRIGGER clause, the trigger is a row trigger. Consider the following code:
▪ FOR EXAMPLE
CREATE OR REPLACE TRIGGER course_au AFTER UPDATE ON COURSE FOR EACH ROW …
In this code fragment, the statement FOR EACH ROW is present in the CREATE TRIGGER clause. Therefore, this trigger is a row trigger. If an UPDATE statement causes 20 records in the COURSE table to be modified, this trigger ...
Get Oracle® PL/SQL® Interactive Workbook, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.