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
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)- A14% (5)
- B74% (26)
- C9% (3)
- D3% (1)
Community Discussion
No community discussion yet for this question.
