Thursday, October 27, 2011

Creating a simple DB2 Trigger

When Trigger?

           When a specified SQL operation i.e. a DELETE, INSERT, or UPDATE occurs on a table, a trigger can be activated that defines a set of actions. Triggers, unlike referential and check constraints, can even be used to update other tables.

Triggers can be fired before or after an INSERT, DELETE, or UPDATE of a table

Creating Trigger:

Figure 1.

Figure 2.

Figure 3.

Figure 4.

Figure 5. Specify the column name

No comments:

Post a Comment