...just to add to this...
If you have "before insert" trigger, :old.column_name will be null. :new.column_name will be populated with the new, insert value (or Null if passed as null).
Similarly, for "before delete" triggers, :new.column_name will be null.
THe reason I highlight this, is that if you are doing comparisons in your trigger and compare null values, then you, of course, will get null as a result (remember a comparison/evaluation with a null returns null)
Main Topics
Browse All Topics





by: schwertnerPosted on 2008-06-14 at 05:46:12ID: 21785103
The row has columns. You can acess the columns using this syntax in the trigger:
:new.column_name ---> this is the replacing value
:old.column_name ---> this is the replaced value