nerdexam
Oracle

1Z0-047 · Question #26

View the Exhibit and examine DEPARTMENTS and the LOCATIONS tables. Evaluate the following SOL statement: SELECT location_id, city FROM locations I WHERE NOT EXISTS (SELECT location_id FROM…

The correct answer is C. The statement would execute but it will return zero rows because the WHERE clause in the inner. See the full explanation below for the reasoning.

Question

View the Exhibit and examine DEPARTMENTS and the LOCATIONS tables. Evaluate the following SOL statement:

SELECT location_id, city FROM locations I WHERE NOT EXISTS (SELECT location_id FROM departments WHERE location_id <> I. location_id); This statement was written to display LOCATIONJD and CITY where there are no departments located. Which statement is true regarding the execution and output of the command?

Exhibit

1Z0-047 question #26 exhibit

Options

  • AThe statement would execute and would return the desired results.
  • BThe statement would not execute because the = comparison operator is missing in the WHERE
  • CThe statement would execute but it will return zero rows because the WHERE clause in the inner
  • DThe statement would not execute because the WHERE clause in the outer query is missing the

How the community answered

(57 responses)
  • A
    5% (3)
  • B
    11% (6)
  • C
    81% (46)
  • D
    4% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-047 Practice