Merging data from a source set into a target relation
Available in
DSQL, PSQL
Syntax
Description
The MERGE
statement merges data into a table or updatable view. The source may be a table, view or “anything you can from” in general. Each source record will be used to update one or more target records, insert a new record in the target table, or neither.
The action taken depends on the supplied join condition and the WHEN
clause(s). The condition will typically contain a comparison of fields in the source and target relations.
Examples