MERGE - 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

Merges a source row set into a primary-indexed target table based on whether any target rows satisfy a specified matching condition with the source row. The target table cannot be column partitioned.

 

IF the source and target rows …

THEN the merge operation …

satisfy the matching condition

updates based on the WHEN MATCHED THEN UPDATE clause.

deletes based on the WHEN MATCHED THEN DELETE clause.

do not satisfy the matching condition

inserts based on the WHEN NOT MATCHED THEN INSERT clause.

For details on the temporal form of MERGE, see Temporal Table Support.