1Z0-007 · Question #179
Examine the data in the EMPLOYEES and EMP_HIST tables: The EMP_HIST table is updated at the end of every year. The employee ID, name, job ID, and salary of each existing employee are modified with…
The correct answer is B. MERGE INTO emp_hist eh. This task can be done using the MERGE command. Correct syntax for the MERGE command is MERGE INTO table1 USING table2 on (join_condition) WHEN MATCHED UPDATE SET col1 = value WHEN NOT MATCHED INSERT (column_list) values (column_values). Incorrect Answers A: MERGE command can…
Question
Examine the data in the EMPLOYEES and EMP_HIST tables:
The EMP_HIST table is updated at the end of every year. The employee ID, name, job ID, and salary of each existing employee are modified with the latest data. New employee details are added to the table. Which statement accomplishes this task?
Exhibit
Options
- AUPDATE emp_hist
- BMERGE INTO emp_hist eh
- CMERGE INTO emp_hist eh
- DMERGE INTO emp_hist eh
How the community answered
(34 responses)- A6% (2)
- B76% (26)
- C3% (1)
- D15% (5)
Explanation
This task can be done using the MERGE command. Correct syntax for the MERGE command is MERGE INTO table1 USING table2 on (join_condition) WHEN MATCHED UPDATE SET col1 = value WHEN NOT MATCHED INSERT (column_list) values (column_values). Incorrect Answers A: MERGE command can handle this task, not UPDATE: new employee details will not be added C: This statement would by correct if UPDATE SET is syntax used, not UPDATE table_name SET syntax as in usual UPDATE command. D: "ON condition" clause of the MERGE command is absent.
Topics
Community Discussion
No community discussion yet for this question.
