QuestionQ224

VerifiedManipulating Data

Refer to the Exhibit and review the description of the CUSTOMERS table.

Question Image

You need to update the CUST_INCOME_LEVEL and CUST_CREDIT_LIMIT columns for the customer whose CUST_ID is 2360. The CUST_INCOME_LEVEL value must match that of the customer whose CUST_ID is 2560, and the CUST_CREDIT_LIMIT value must match that of the customer whose CUST_ID is 2566.

Which UPDATE statement accomplishes this task?

Explanation

Separate scalar subqueries can assign each target column a value from a different source row. The update is restricted to customer 2360, with CUST_INCOME_LEVEL obtained from customer 2560 and CUST_CREDIT_LIMIT obtained from customer 2566. Oracle requires a subquery used to assign multiple columns to return exactly one row with the corresponding number of values.

Learn more

Community Discussion

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