Could be the best answer


  • 0
    4

    SELECT FirstName, LastName, City, State FROM Person NATURAL LEFT JOIN Address;


  • 0
    H

    Why my code no doesn't works

    select FirstName, LastName, City, State from person NATURAL LEFT JOIN address where address.PersonID = person.PersonId;

    It's very similar

    :(

    i'm very Noob on Mysql query, do you explain me ?, please


  • 0
    H

    select FirstName, LastName, City, State from Person NATURAL LEFT JOIN Address where Address.PersonId = Person.PersonId or Address.PersonID is NULL;


  • 0

    select FirstName, LastName, City, State from Person NATURAL LEFT JOIN Address


Log in to reply
 

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