By default, any trigger that you define on a typed table of Dynamic Server is inherited by all its subtables.
If you define a trigger on a subtable of a typed table, however, this trigger overrides any trigger for the same type of triggering event (Select, Delete, Insert, or Update) that the subtable inherits from its supertable. A trigger that you set on a subtable is inherited by all its dependent tables, but has no effect on its supertable.
If a subtable within a table hierarchy is under more than one table that defines the same type of trigger, the subtable inherits only the trigger from the most proximate table above it in the hierarchy, because that trigger overrides any inherited trigger that is defined for the same type of triggering event.
This behavior is important when you require a trigger to be enabled in a supertable, but to be disabled in its subtable. You cannot use the SET TRIGGERS option of the SET Database Object Mode statement to disable an inherited trigger selectively within a hierarchy. Similarly, the DROP TRIGGER statement cannot destroy an inherited trigger without also destroying the trigger on the supertable. In this situation, you must instead define a trigger with no Action clause on the subtable. Because triggers are not additive, this empty trigger overrides the inherited trigger and executes for the subtable and for any subtables under the subtable, which are not subject to further overrides.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]