Combine Two Tables


  • 0

    Click here to see the full article post


  • 0
    X
    This post is deleted!

  • 0
    C

    select p.FirstName FirstName, p.LastName LastName, a.City City, a.State State from person outer join address on p.PersonId=a.PersonId


  • 0
    B

    SELECT p.FirstName FirstName, p.LastName LastName, a.City City, a.State State
    FROM person p OUTER JOIN address a ON p.PersonId = a.PersonId


  • 0
    W

    select Person.FirstName ,Person.LastName ,Address.city, Address.State
    from Person left outer join Address
    on Person.PersonId=Address.PersonId


  • 0
    P

    select FirstName, LastName, City, State
    from Person left join Address
    on Person.PersonId = Address.PersonId


  • 0
    K

    I'm confused, isn't the solution just a left join and not an 'outer join' as stated in the Approach?


  • 0
    D

    @Ku113n 'left join' = 'left outer join'. The outer is apparently optional but left, right & full are all outer join options


  • 0
    S

    select FirstName,LastName,City,State from Person left join Address on Person.PersonId=Address.PersonId;


  • 0
    G

    select person.FirstName,person.LastName, address.City,address.State from person left join address on person.personId=Address.PersonId


  • 0
    E

    SELECT FirstName, LastName, City, State
    FROM Person LEFT JOIN Address ON Person.PersonID = Address.PersonID


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.