15.00 - Function of REPLACE TRIGGER Requests - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

prodname
Teradata Database
vrm_release
15.00
category
Programming Reference
featnum
B035-1184-015K

Function of REPLACE TRIGGER Requests

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. Teradata 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. See “ALTER TRIGGER” on page 147 for information about changing trigger timestamps.