0175-Combine Two Tables

題目如下:

Write a SQL query for a report that provides the following information for each person in the Person table, regardless if there is an address for each of those people:

FirstName, LastName, City, State

只求 pass 的解答。不過我很好奇當初我怎麼是選 MySQL 不是選 MS SQL Server

1
2
3
4
5
# Write your MySQL query statement below
SELECT p.FirstName, p.LastName, a.City, a.State
FROM Person p
LEFT JOIN Address a 
ON p.PersonId = a.PersonId
updatedupdated2021-05-172021-05-17