1.常用的三种
内连接:select select_list from A inner join B on A.key=B.key
左外连接: select select_list from A left join B on A.key=B.key
右外连接: select select_list from A right join B on A.key=B.key
2.用法升级
左连接:select select_list from A left join B on A.key=B.key where B.key is null
右连接:select select_list from A right join B on A.key=B.key where A.key is null
全连接:
select select_list from A left join B on A.key=B.key
union
select select_list from A right join B on A.key=B.key
全外连接:
select select_list from A left join B on A.key=B.key where B.key is null
union
select select_list from A right join B on A.key=B.key where A.key is null