Adding triggers using System i Navigator

Using System i® Navigator, you can define system triggers and SQL triggers. Additionally, you can enable or disable a trigger on a physical database file.

A trigger is a set of actions that run automatically when a specified change operation is performed on a specified database file. In this discussion, a table is a physical file. The change or read operation can be an insert, update, or delete high-level language statement in an application program, or an SQL INSERT, UPDATE, or DELETE statement.

To add a trigger, follow these steps:

  1. From System i Navigator, expand your system > Databases.
  2. Expand the database that you want to work with.
  3. Expand Schemas and the schema that contains the table to which you want to add the trigger.
  4. Click Tables.
  5. Right-click the table to which you want to add the trigger, and select New > Trigger. Click External to add a system trigger or SQL to add an SQL trigger.