1Z0-007 · Question #111
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…
The correct answer is A. MERGE INTO new_employees c. this is the correct MERGE statement syntax Incorrect answer: B it should MERGE INTO table_name C it should be WHEN MATCHED THEN D it should MERGE INTO table_name
Question
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?
Options
- AMERGE INTO new_employees c
- Bname = e.first_name ||','|| e.last_name
- CMERGE new_employees c
- Dname = e.first_name ||','|| e.last_name
- EMERGE INTO new_employees cUSING employees e
- Fname = e.first_name ||','|| e.last_name
- GMERGE new_employees c
- Hname = e.first_name ||','|| e.last_name
How the community answered
(29 responses)- A72% (21)
- B7% (2)
- C3% (1)
- G14% (4)
- H3% (1)
Explanation
this is the correct MERGE statement syntax Incorrect answer: B it should MERGE INTO table_name C it should be WHEN MATCHED THEN D it should MERGE INTO table_name
Topics
Community Discussion
6The answer is A, and here is the sticky way to lock it in forever: Oracle MERGE always needs the word INTO right after MERGE, so think of it like merging onto a freeway, you always merge INTO traffic, you never just "merge traffic" and hope for the best. Options C and G drop the INTO keyword entirely, which means Oracle throws them right off the road with a syntax error. The full skeleton you must memorize is MERGE INTO target USING source ON condition, and a fun acronym for that is "MI-US-ON," or picture a Miami song playing while you merge data, "Miami, Using Only Numbers." Lock that in and any MERGE question on the 1Z0-007 becomes free points.
Honestly my first instinct here was to second-guess option A because the snippet looks incomplete and I kept hunting for a full statement across the choices, which is the trap the question setter laid. I wasted about ten seconds mentally trying to stitch B or D onto something because the concatenation logic looked plausible for the UPDATE SET clause in a real MERGE block. What snapped me back was remembering the one thing Oracle has never budged on since MERGE landed in 9i, and that is the INTO keyword is not optional. MERGE INTO target USING source ON condition, full stop. Options C and G drop INTO entirely and Oracle will throw ORA-00905 missing keyword before you even get to the ON clause, so those are dead on arrival. A is the only fragment that opens with the syntactically legal MERGE INTO new_employees c, which means it is the only one that could anchor a valid statement regardless of what follows. If you see an exam question where half the options are continuation lines, ignore the noise and go straight to the first keyword sequence, because Oracle's parser does exactly the same thing. MOS note 1088018.1 has a clean breakdown of MERGE syntax errors if you want to drill this before test day.
Before you guess, tell me, do you actually know what the MERGE statement requires syntactically right after the keyword MERGE itself, or are you just ruling out options by eye because something looks off? The answer hinges on one mandatory keyword that Oracle demands before the target table name, and if you can name it without looking, you already know why A is the only valid choice here.
A is right, MERGE always requires INTO to name the target.
F has the correct concatenation syntax, that comma separator sealed it for me.
Wesley, the comma there is not concatenation, it just separates arguments and typically inserts a space, which is why A is the answer with the actual string-joining operator doing the real work.