Which MERGE statement is valid?

Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables: EMPLOYEES
EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME
VARCHAR2(25) HIRE_DATE DATE NEW_EMPLOYEES EMPLOYEE_ID NUMBER
Primary Key NAME VARCHAR2(60) Which MERGE statement is valid?

Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables: EMPLOYEES
EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME
VARCHAR2(25) HIRE_DATE DATE NEW_EMPLOYEES EMPLOYEE_ID NUMBER
Primary Key NAME VARCHAR2(60) Which MERGE statement is valid?

A.
MERGE INTO new_employees c USING employees e ON (c.employee_id =

e.employee_id) WHEN MATCHED THEN UPDATE SET c.name = e.first_name ||’,’||
e.last_name WHEN NOT MATCHED THEN INSERT VALUES (e.employee_id, e.first_name
||’, ‘||e.last_name);

B.
MERGE new_employees c USING employees e ON (c.employee_id = e.employee_id)
WHEN EXISTS THEN UPDATE SET c.name = e.first_name ||’,’|| e.last_name WHEN NOT
MATCHED THEN INSERT VALUES (e.employee_id, e.first_name ||’, ‘||e.last_name);

C.
MERGE INTO new_employees c USING employees e ON (c.employee_id =
e.employee_id) WHEN EXISTS THEN UPDATE SET c.name = e.first_name ||’,’||
e.last_name WHEN NOT MATCHED THEN INSERT VALUES(e.employee_id, e.first_name
||’, ‘||e.last_name);

D.
MERGE new_employees c FROM employees e ON (c.employee_id = e.employee_id)
WHEN MATCHED THEN UPDATE SET c.name = e.first_name ||’,’|| e.last_name WHEN
NOT MATCHED THEN INSERT INTO new_employees VALUES (e.employee_id,
e.first_name ||’, ‘||e.last_name);



Leave a Reply 2

Your email address will not be published. Required fields are marked *