A trigger defines a set of actions that are performed in response to an insert, update, or delete operation on a specified table. The trigger is activated when such an SQL operation is executed. Triggers are optional and are defined with the CREATE TRIGGER statement.
Triggers can be used, along with referential constraints and check constraints, to enforce data integrity rules. When triggers are activated, they can update other tables, or generate or transform values for inserted or updated rows. Triggers can also invoke functions to perform tasks such as issuing alerts.
Triggers are a useful mechanism for defining and enforcing transitional business rules, which are rules that involve different states of the data. For example, you can create a trigger so that a salary that cannot be increased by more than 10 percent.
From the workbench, you can create a trigger on a table from the Administration explorer or the Data Source explorer. You define the trigger by specifying trigger properties and deploying the trigger by creating and running a change plan.