nerdexam
Oracle

1Z0-047 · Question #235

View the Exhibit and examine the structure of ORDERS and CUSTOMERS tables. Evaluate the following UPDATE statement: UPDATE (SELECT order_date, order_total, customer_id FROM orders) SET order_date =…

The correct answer is B. It would execute and restrict modifications to only the columns specified in the SELECT statement. See the full explanation below for the reasoning.

Question

View the Exhibit and examine the structure of ORDERS and CUSTOMERS tables. Evaluate the following UPDATE statement:

UPDATE (SELECT order_date, order_total, customer_id FROM orders) SET order_date = 22-mar-2007' WHERE customer_id = (SELECT customer_id FROM customers WHERE cust_last_name = 'Roberts'AND Credit_limit = 600); Which statement is true regarding the execution of the above UPDATE statement?

Exhibit

1Z0-047 question #235 exhibit

Options

  • AIt would not execute because two tables cannot be used in a single UPDATE statement.
  • BIt would execute and restrict modifications to only the columns specified in the SELECT statement.
  • CIt would not execute because a subquery cannot be used in the WHERE clause of an UPDATE statement.
  • DIt would not execute because the SELECT statement cannot be used in place of the table name.

How the community answered

(35 responses)
  • A
    14% (5)
  • B
    74% (26)
  • C
    9% (3)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-047 Practice