Define a Table Override Trigger
You can use the Table Trigger Editor to define a table override trigger. Specify general information for a table override trigger, such as the action for which the trigger should fire, when the trigger should fire, how the trigger should fire, and so forth.
To define a table override trigger
- Right-click the table for which you want to define a trigger and click Trigger Properties.
The Table Trigger Editor opens. 
- Select the trigger in the Navigation Grid that you want to define.
Click New  on the toolbar to create a new trigger. Use the Enter filter text box to filter a very large list of triggers to quickly locate the one that you want to define. on the toolbar to create a new trigger. Use the Enter filter text box to filter a very large list of triggers to quickly locate the one that you want to define.
- Work with the following options:
- Name
- Displays the table trigger name. You can change the trigger name in this field. 
- Insert
- Specifies to execute the table trigger on INSERT. 
- Update
- Specifies to execute the table trigger on UPDATE. 
- Delete
- Specifies to execute the table trigger on DELETE. 
- Fire
- Specifies when the table trigger is executed. Make a selection from the drop-down control. 
- Generate
- Generates SQL during forward engineering. Clear the check box if you do not want to generate SQL. 
 
- Click the General tab and work with the following options:
- New
- Specifies the name to use to reference the post-change data in the table. Enter the name in this field. You can use the %RefClause macro to include the REFERENCES clause in the trigger. 
- Old
- Specifies the name to use to reference the pre-change data in the table. Enter the name in this field. You can use the %RefClause macro to include the REFERENCES clause in the trigger. 
- Parent
- Displays the name of the selected table (if it is the parent table in a relationship) or the parent of the selected table, for each relationship in which the selected table is involved. 
- Child
- Displays the name of the selected table (if it is the child table in a relationship) or the child of the selected table, for each relationship in which the selected table is involved. 
- Verb Phrase
- Displays the name of all relationships for the selected table. 
- Integrity Rule
- List the referential integrity rules that apply to the selected relationship. Rules are abbreviated and indicate the RI trigger action, such as CHILD UPDATE (CU:) and the RI type, such as RESTRICT (R). 
 
- Click the Code tab to define the code type for the table trigger.
- Click the Expanded tab to view expanded code for the table trigger.
- (Optional) Click the Comment tab and enter any comments that you want to associate with the table trigger.
- (Optional) Click the UDP tab to work with user-defined properties for the table trigger.
- (Optional) Click the Notes tab to view history associated with the table trigger and to add or view user notes.
- Click Close.
The table override trigger is defined and the Table Trigger Editor closes. 
| 
 Copyright © 2023 Quest Software, Inc. |