Triggers

A trigger is a set of actions that will be executed when a defined event occurs. These are known as active triggers. 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 ...

Get DB2® Universal Database™ for OS/390™ v7.1 Application Certification Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.