Function of REPLACE TRIGGER Requests | Teradata Vantage - Function of REPLACE TRIGGER Requests - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

REPLACE TRIGGER executes as a DROP TRIGGER request followed by a CREATE TRIGGER request, except for the handling of the privileges granted to the original trigger. The database retains all of the privileges that were granted directly on the original trigger for the replacement trigger.

If the specified trigger does not exist, the REPLACE TRIGGER statement creates it. In this case, the REPLACE statement has the same effect as a CREATE TRIGGER statement.

If an error occurs during the replacement of the trigger, the existing trigger is not dropped and its definition remains as it was before the replacement attempt was made.

REPLACE TRIGGER does not change the timestamp generated when the trigger was originally created. For information about changing trigger timestamps, see “ALTER TRIGGER” in Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.