A trigger is a stored procedure that executes in response to an event. For example, a trigger can be executed when a row in a table is inserted, updated, or deleted. The trigger tells the DBMS how to process the SQL INSERT, UPDATE, or Delete commands to enforce business rules. You can use the Teradata Table Trigger Editor to define the stored procedures that exist for the selected table in a Teradata physical model.
To define a Teradata table trigger
The Teradata Table Trigger Editor opens.
Note: Click New on the toolbar to create a new trigger.
Specifies the name of the trigger.
Specifies the database or user to which the trigger belongs. Select from the drop-down list.
Specifies whether to execute the trigger on insert.
Specifies whether to execute the trigger on delete.
Specifies whether to execute the trigger on update.
Specifies when the trigger is executed. Select from the drop-down list. Valid values are After, Before, For Each Row, For, or Instead Of.
Specifies the order to fire the triggers.
Specifies whether the trigger is enabled or disabled. Select from the drop-down list. Valid values are Enabled and Disabled.
Specifies that Forward Engineering will use the REPLACE command instead of the CREATE command.
Generates DDL for this object during Forward Engineering.
Specifies the scope of the trigger. Select from the drop-down list. Valid values are: Row or Statement.
Indicates the name that you want to use to reference the post-change data in the table. You can use the %RefClause macro to include the REFERENCES clause in the trigger.
Specifies the name for the new row.
Indicates the name that you want to use to reference the pre-change data in the table. You can use the %RefClause macro to include the REFERENCES clause in the trigger.
Specifies the name of the old row.
Specifies the condition on when to trigger.
Specifies the name of the old new transition table.
Specifies an alias to reference specific old value columns of the row in the old new transition table.
Specifies an alias to reference specific new value columns of the row in the old new transition table.
Displays the valid columns that can have a trigger fired when updated. Select the appropriate columns. This section becomes active when you select to execute the trigger on update.
Displays the relationships and tables associated with the trigger.
The Teradata Table Trigger Editor closes.
Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |