QuestionQ167

VerifiedManipulating Data

Review this description of the PRODUCTS table:

Question Image

You successfully run this command:

CREATE TABLE new_prices (prod_id NUMBER(2), price NUMBER(8,2))  

Which two statements execute without error?

Choose two
Explanation

A MERGE statement requires an ON condition. Its DELETE WHERE clause is part of the matched update operation, so it must follow an UPDATE SET clause. A valid MERGE may perform an update followed by DELETE WHERE, and it may also contain only a WHEN NOT MATCHED THEN INSERT branch; the insert branch's WHERE condition may reference source-table columns. Therefore, statements C and D execute without errors.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!