https://leetcode-cn.com/problems/combine-two-tables/
看LeetCode上的就行,很详细也有扩充。
select FirstName, LastName, City, State from Person left join Address on Person.PersonId = Address.PersonId;
或者:(这个要慢11ms)
select FirstName, LastName, City, State from Person as p left join Address as a on p.PersonId = a.PersonId;