Which query will produce a list of all countries with no capital?

Which query will produce a list of all countries with no capital?

Which query will produce a list of all countries with no capital?

A.
SELECT Country.name FROM Country, City WHERE Country.Capital=City.id AND ISNULL{City.Name}

B.
SELECT Country.name FROM Country, City ON Country.Capital=City.id WHERE ISNULL(City.name)

C.
SELECT Country.name FROM Country LEFT JOIN City ON Country.Capital=City.id WHERE ISNULL(City.name)

D.

Explanation:
Both A and B are inner (comma) joins – no mismatches. C is outer join so also shows mismatches, and IS NULL finds those mismatches.



Leave a Reply 0

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