nerdexam
Oracle

1Z0-047 · Question #9

View the Exhibit and examine the structure of the ORDERS and ORDER_ITEMS tables. In the ORDERS table, ORDER_ID is the PRIMARY KEY and ORDER_DATE has the DEFAULT value as SYSDATE. Evaluate the…

The correct answer is D. The UPDATE statement would change all the ORDER_DATE values to SYSDATE irrespective of what. See the full explanation below for the reasoning.

Question

View the Exhibit and examine the structure of the ORDERS and ORDER_ITEMS tables. In the ORDERS table, ORDER_ID is the PRIMARY KEY and ORDER_DATE has the DEFAULT value as SYSDATE. Evaluate the following statement:

UPDATE orders SET order_date=DEFAULT WHERE order_id IN (SELECT order_id FROM order_items WHERE qty IS NULL); What would be the outcome of the above statement?

Exhibit

1Z0-047 question #9 exhibit

Options

  • AThe UPDATE statement would not work because the main query and the subquery use different tables.
  • BThe UPDATE statement would not work because theDEFAULTvaluecan be used only in INSERT statements.
  • CThe UPDATE statement would change all ORDER_DATE values to SYSDATE provided the current
  • DThe UPDATE statement would change all the ORDER_DATE values to SYSDATE irrespective of what

How the community answered

(59 responses)
  • A
    7% (4)
  • B
    17% (10)
  • C
    3% (2)
  • D
    73% (43)

Community Discussion

No community discussion yet for this question.

Full 1Z0-047 Practice