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

Teradata Vantage™ - SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1184-171K
Language
English (United States)

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.