Cascading and Recursion of Triggers - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

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

Cascading is not itself an element of triggers, but row triggers can create a cascade when a statement fires a trigger, which in turn fires another trigger, and so on. Thus the outcome of one triggering event can itself become another trigger.

The following rules apply to trigger cascading and recursion:

  • BEFORE triggers cannot cascade because they have no data-changing statements.
  • Trigger recursion, including self-referencing triggers, is valid. In other words, you can make backward references to triggering statements in a cascade of triggers.
  • Cascaded row triggers that refer to a transition table are not valid.
  • To prevent an infinite recursive loop, the system imposes a limit of 16 cascaded or recursive triggers. This limit is enforced at run time, and the system rolls back requests with cascading of triggers that exceed this limit.