Results 1 to 2 of 2

Thread: left outer join

  1. #1
    Join Date
    May 2004
    Southampton UK

    Unanswered: left outer join

    I have been trying to work out a solution to the following problem without any success.
    Are there any experts out there that can help?

    List the name of each city in the city table that is not shown as the capital of a country in the country table
    Write an SQL query to satisfy this request using a left outer join

    The significant columns in the country table are
    name -- name of the country
    capital - capital of that country.

    The significant columns in the city table are
    name -- name of the city
    country --- the country where that city is located

  2. #2
    Join Date
    May 2003
    Parsippany NJ
    select a.Name from city a left outer join Country b on a.Name = b.Capital where b.Name is null

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts