题目地址:https://leetcode.com/problems/combine-two-tables/
样例中有些人的 PersonId
无法在 Address
表中找到,所以使用 LEFT JOIN
.
SELECT FirstName, LastName, City, State
FROM Address
JOIN Person
ON Person.PersonId=Address.PersonId;
题目地址:https://leetcode.com/problems/combine-two-tables/
样例中有些人的 PersonId
无法在 Address
表中找到,所以使用 LEFT JOIN
.
SELECT FirstName, LastName, City, State
FROM Address
JOIN Person
ON Person.PersonId=Address.PersonId;