Previous |
Next |
When a row-level trigger fires, the PL/SQL run-time system creates and populates the two pseudorecords OLD
and NEW
. They are called pseudorecords because they have some, but not all, of the properties of records.
For the row that the trigger is processing:
For an INSERT
trigger, OLD
contains no values, and NEW
contains the new values.
For an UPDATE
trigger, OLD
contains the old values, and NEW
contains the new values.
For a DELETE
trigger, OLD
contains the old values, and NEW
contains no values.
To reference a pseudorecord, put a colon before its name—:OLD
or :NEW
—as in Example: Creating an INSTEAD OF Trigger.