Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
General Database Discussions
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Jan 17, 2013 1:37 PM by
Help with trigger
Jan 17, 2013 1:32 PM
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.
This content has been marked as final.
Show 1 reply
Re: Help with trigger
Jan 17, 2013 1:37 PM
in response to
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.