O'Reilly logo

DB2® Universal Database for OS/390® Version 7.1 Certification Guide by Susan Lawson, Richard Yevich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Triggers

A trigger is a set of actions that will be executed when a defined event occurs. The triggering events can be the following SQL statements:

  • INSERT

  • UPDATE

  • DELETE

Triggers are defined for a specific table and once defined, a trigger is automatically active. A table can have multiple triggers defined for it, and if multiple triggers are defined for a given table, the order of trigger activation is based on the trigger creation timestamp (the order in which the triggers were created). Trigger definitions are stored in the DB2 catalog tables.

  • SYSIBM.SYSTRIGGERS

    • One row for each trigger

    • TEXT column contains full text of CREATE TRIGGER

  • SYSIBM.SYSPACKAGE

    • One row for each trigger package

    • TYPE column set to “T” to indicate a trigger package

Trigger Usage ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required