[leetcode]Combine Two Tables

此题就是一个联表查询,不过我当时认为join就是left join,没有用on,用的where结果做成内联了,错了几次。

1
2
3
4
select p.FirstName, p.LastName, a.City, a.State
from Person as p
left join Address as a
on p.PersonId = a.PersonId
Licensed under CC BY-NC-SA 4.0