Which three are true? (Choose three.)
-
A MERGE statement is used to merge the data of one table with data from another.
-
A MERGE statement replaces the data of one table with that of another.
-
A MERGE statement can be used to insert new rows into a table.
-
A MERGE statement can be used to update existing rows in a table.
MERGE combines insert and update operations in a single statement to synchronize tables. It inserts new rows when matches aren't found and updates existing rows when matches exist. MERGE does not replace entire table contents - it performs targeted operations based on match conditions between source and target.
To answer this question, let's go through each option to understand why it is correct or incorrect:
Option A) A MERGE statement is used to merge the data of one table with data from another. - This option is correct. A MERGE statement combines data from two tables based on a specified condition and updates or inserts data into a target table based on the matching condition.
Option B) A MERGE statement replaces the data of one table with that of another. - This option is incorrect. A MERGE statement does not replace the data of one table with another. It merges or updates data based on the specified condition.
Option C) A MERGE statement can be used to insert new rows into a table. - This option is correct. A MERGE statement can insert new rows into a table when a matching condition is not met during the merge operation.
Option D) A MERGE statement can be used to update existing rows in a table. - This option is correct. A MERGE statement can update existing rows in a table based on the specified condition.
Therefore, the correct answers are A, C, and D.