17.10 - Cascading and Recursion of Triggers - 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)

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.