16.20 - Triggered SQL Statement Clause - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Content Type
Programming Reference
Publication ID
B035-1144-162K
Language
English (United States)
Last Update
2019-05-24

The triggered SQL statement clause is composed of one or more SQL procedure statements.

The ANSI SQL:2011 specification requires multiple statements to be enclosed within the BEGIN ATOMIC and END keywords. The Teradata Database complies with this, and also allows you to specify multiple SQL procedure statements without the BEGIN ATOMIC and END keywords.

Each triggered action statement in an SQL procedure statement list must be terminated by a SEMICOLON (;) character.

You can specify the list of SQL procedure statements either enclosed or not enclosed by parentheses.

If you are typing the SQL text using BTEQ and you specify the list of SQL procedure statements without enclosing it in parentheses, then the SEMICOLON character terminating each statement must be typed at the beginning of the next line following the statement line. The next triggered action statement in the list must be continued in the same line as the SEMICOLON character.

UDT expressions are valid in triggered SQL statements.

See Teradata Vantage™ Temporal Table Support , B035-1182 for details and examples of using triggered SQL statements with temporal tables.