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.