When to Fire Triggers - Advanced SQL Engine - Teradata Database

Database Introduction

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
jiv1600056352873.ditamap
dita:ditavalPath
jiv1600056352873.ditaval
dita:id
B035-1091
lifecycle
previous
Product Category
Teradata Vantage™

You can specify when triggers fire.

WHEN you specify… THEN the triggered action…
BEFORE executes before the completion of the triggering event.

As specified in the ANSI/ISO SQL standard, a BEFORE trigger cannot have data changing statements in the triggered action.

AFTER executes after completion of the triggering event.
To support stored procedures the CALL statement is supported in the body of an AFTER trigger. Both row and statement triggers can call a stored procedure.

Sometimes a request fires a trigger, which in turn, fires another trigger. Thus the outcome of one triggering event can itself become another trigger. Teradata Database processes and optimizes the triggered and triggering statements in parallel to maximize system performance.