In oracle I can specify the columns, which should induce a firing of a trigger:
create or replace trigger my_trigger
before update of col1, col2, col3 on my_table for each row
begin
// the trigger code will be executed only if col1 or col2 or col3 was updated
end;
Now I want to do the following: I don't want the trigger to fire, when only one column was updated. How is this possible?
I could list all columns except the one, which should not induce a firing of the trigger. This is quite cumbersome for tables, which many columns.
Another way would be to use the UPDATING function like this:
if not updating('COL3') then...
But if I changed COL1 and COL3, the above statement would evaluate to true.