ALTER TRIGGER Syntax Elements - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™
database_name
Name of the database containing the trigger definition if not the default database for the trigger_name or table_name.
user_name
Name of the user containing the trigger definition if not the default database for the trigger_name or table_name.
trigger_name
The name of the trigger to be altered.
 If you specify trigger_name you can alter only one trigger at a time.
ENABLED
The named trigger or all triggers on the named table are to be enabled.
 Enabled triggers function as active database objects and follow normal trigger protocol.

DISABLED
The named trigger or all triggers on the named table are to be disabled. Disabled triggers continue to exist as database objects, but cannot execute. For a trigger to execute, it must first be enabled.
TIMESTAMP
The creation timestamp of the named trigger is to be replaced with the current timestamp. 
Altering the creation timestamp of a trigger changes its position in the default order of execution, when multiple triggers are defined on a table.
The TIMESTAMP option does not apply to a table.
You can use the TIMESTAMP option to change the order of execution of triggers, particularly triggers that were created without the ORDER clause. If you do not specify a TIMESTAMP, then the existing timestamp for the trigger is not changed.
ALTER TRIGGER uses the current time when adding a timestamp. To change the timings for multiple order-sensitive triggers defined on the same table, you must submit ALTER TRIGGER statements that change the timestamps in the required order to ensure the correct execution precedence.
table_name
The name of the table on which triggers are to be enabled or disabled.