Oracle SQL trigger on update of column

后端 未结 4 804
误落风尘
误落风尘 2021-01-04 02:36

I\'m trying to create a trigger for my table which automatically adds a published date based on when a certain flag is set to \'Y\'

I don\'t have much experience wit

4条回答
  •  悲哀的现实
    2021-01-04 03:22

    I don't know What version of Oracle do you use? In Oracle 10g I got the following error:

    ORA-04084: cannot change NEW values for this trigger type
    04084. 00000 -  "cannot change NEW values for this trigger type"
    *Cause:    New trigger variables can only be changed in before row
               insert or update triggers.
    *Action:   Change the trigger type or remove the variable reference.
    

    It does not allow to change the field on AFTER triggers.

提交回复
热议问题