In a Spark SQL
MERGE INTO statement, what does a WHEN MATCHED THEN UPDATE clause do?- aInserts a new row for every row present only in the source table
- bUpdates a matching target row per the merge condition✓
- cDeletes every row in the target table regardless of the merge condition
- dRewrites the entire target table from scratch on every run
Explanation:
WHEN MATCHED THEN UPDATE applies only to target rows that satisfy the merge condition against a source row; unmatched source rows are handled by a separate WHEN NOT MATCHED clause.