1.
select <select_list> from tableA A inner join tableB B on A.key = B.key
2,
select <select_list> from tableA A left join tableB B on A.key = B.key
3.
select <select_list> from tableA A right join tableB B on A.key = B.key
4.
select <select_list> from tableA A left join tableB B on A.key = B.key where B.key is NULL
5.
select <select_list> from tableA A right join tableB B on A.key = B.key where A.key is NULL
6.
select <select_list> from tableA A full outer join tableB B on A.key = B.key //mysql不支持
可以采用以下方法:
select <select_list> from tableA A left join tableB B on A.key = B.key union select <select_list> from tableA right join tableB on A.key = B.key
7.
select <select_list> from tableA A full outer join tableB B on A.key = B.key where A.key is null or B.key is null //mysql不支持
可以采用以下方法:
select <select_list> from tableA A left join tableB B on A.key = B.key where B.key is null union select <select_list> from tableA right join tableB on A.key = B.key where A.key is null