When you create a trigger, you specify the table affected and the command (insert, update, or delete) that activates the trigger. You also specify the action the trigger is to take.
Only a table owner or database owner can create a trigger.
Creating a trigger
In the table, select the Triggers folder.
Select File | New | Trigger. The Trigger Creation wizard opens.
The Trigger Creation wizard asks for the following information:
Input |
Description |
|---|---|
Name |
Name for the new trigger. |
Owner |
Specify the user who owns the trigger. |
Event |
Specify the events that can fire the trigger: Insert, Delete, Update, Update of a column. |
Code |
Enter the code for the trigger in the editor. This text can consist of any valid SQL statements that would follow the as keyword in a create trigger statement. |
A trigger can also be created using the Add Trigger
template. Double-click the Triggers icon of the table you want to
add a trigger to. Select Add Trigger (Template).
Select the Triggers folder. In the right pane, double-click the Add Trigger icon.