1 Reply Latest reply on Jan 17, 2013 7:37 PM by JustinCave

    Help with trigger

      Hi, all.

      I need a trigger to fire whenever an update happens. Seems easy, but there are several problems there:

      - I need it to fire in case both :OLD and :NEW are the same value. i.e. I've got "5" currently in the field, and I update and set the same field to "5" again.

      Any simple ideas?

      Thanks in advance.
        • 1. Re: Help with trigger
          I'm not sure what the problem is.

          If a row is updated, any row level triggers will be fired. It doesn't matter whether the :new and :old values are different. It just matters that the row was affected by the update.

          If I have a row-level trigger on the EMP table, for example, that trigger will fire for every row when I run this UPDATE statement
          UPDATE emp
             SET sal = sal
          even though the actual SAL data isn't changing.