#175. 组合两个表
select 得到的列,from 后用 left join 拼接,on 后是拼接规则。
末尾分号
1 | select firstName, lastName, city, state |
#181. 收入超过经理的用户
select 的 from 后跟两个会得到笛卡尔乘积,应当用 and 连接筛选条件,由于 select 只要头为 Employee 的 name 要用 as。
1 | select a.name as Employee |
select 得到的列,from 后用 left join 拼接,on 后是拼接规则。
末尾分号
1 | select firstName, lastName, city, state |
select 的 from 后跟两个会得到笛卡尔乘积,应当用 and 连接筛选条件,由于 select 只要头为 Employee 的 name 要用 as。
1 | select a.name as Employee |