UPDATE (Upsert Form) As a Triggering Action - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

UPDATE (Upsert Form) As a Triggering Action

Triggers invoke the following behavior when fired as the result of an UPDATE (Upsert Form) request:

 

IF a trigger is defined on this type of action …

THEN it is fired …

UPDATE

in all cases for qualified rows.

No insert triggers are performed.

INSERT

only if no row is updated and the INSERT is performed.

If no rows qualify, then no triggers are fired.

Triggers are fired as if the UPDATE and INSERT components in the atomic upsert request are performed as separate statements: unconditionally for UPDATE and conditionally for INSERT. The INSERT is performed only when no rows qualify for the UPDATE.