How Dropping a Column Affects Triggers
In general, when you drop a column from a table, the triggers based
on that table remain unchanged. If the column that you drop appears
in the action clause of a trigger, however, dropping the column can
invalidate the trigger. The following statements illustrate the possible
effects on triggers:
CREATE TABLE tab1 (i1 int, i2 int, i3 int); CREATE TABLE tab2 (i4 int, i5 int); CREATE TRIGGER col1trig UPDATE OF i2 ON tab1 BEFORE(INSERT INTO tab2 VALUES(1,1)); ALTER TABLE tab2 DROP i4;
After the ALTER TABLE statement, tab2 has only one column. The col1trig trigger is invalidated because the action clause as it is currently defined with values for two columns cannot occur.
If you drop a column that occurs in the triggering column list of an UPDATE trigger, the database server drops the column from the triggering column list. If the column is the only member of the triggering column list, the database server drops the trigger from the table. For more information on triggering columns in an UPDATE trigger, see CREATE TRIGGER statement.
If a trigger is invalidated when you alter the underlying table, drop and then re-create the trigger.