Prev Question
Next Question

View the Exhibit and examine DEPARTMENTS and the LOCATIONS tables.

5a10498d39e1d - Which statement is true regarding the execution and output of the command?

Evaluate the following SQL statement:
SELECT location_id, city
FROM locations
l WHERE NOT EXISTS (SELECT location_id
FROM departments
WHERE location_id <> l.location_id);
This statement was written to display LOCATION_ID and CITY where there are no departments located.

Which statement is true regarding the execution and output of the command?

A.
The statement would execute and would return the desired results.

B.
The statement would not execute because the = comparison operator is missing in the WHERE clause of the outer query.

C.
The statement would execute but it will return zero rows because the WHERE clause in the inner query should have the = operator instead of <>.

D.
The statement would not execute because the WHERE clause in the outer query is missing the column name for comparison with the inner query result.

Prev Question
Next Question

Leave a Reply

Your email address will not be published. Required fields are marked *