Can anyone help me understand when to use :NEW
and :OLD
in PLSQL blocks, I\'m finding it very difficult to understand their usage.
In simple way,
Trigger will fire when you manipulate data into table. so while trigger invoke, you have both value. one is referring to old data value and one is the new data value which you recently update/delete/insert. in-case of
insert- old value would be null and new value contain some value update - old and new both have some value delete - old has value but new will not contain value.
so by using :OLD and :NEW, you can insert/update other table where you want to maintain your history or based on :OLD or :NEW value you can insert/update some other dependent table.
Hopefully this helps you..