Function of REPLACE TRIGGER Requests | Teradata Vantage - Function of REPLACE TRIGGER Requests - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
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.