UPSERT (MERGE) command

The UPSERT (or MERGE) command is used to add or update records. The non-ANSI version of UPSERT that is implemented in Teiid is a modified INSERT statement that requires that the target table has a primary key, and that the target columns cover the primary key. Before it performs an INSERT, the UPSERT operation checks whether a row exists, and if it does, UPSERT updates the current row rather than inserting a new one.

Example syntax
UPSERT INTO table [[AS] alias] (column,...) VALUES (value,...)
UPSERT INTO table (column,...) query
UPSERT pushdown
If an UPSERT statement is not pushed to the source, it is broken down into the respective insert/update operations, which requires XA support on the target system to guarantee atomicity.

results matching ""

    No results matching ""