左下角获取A表加B表的数据,mysql数据库不支持 full outer join,mysql下可以这么写:
select * from tableA A left join tableB B on A.key=B.key
union
select * from tableA A right join tableB B on A.key=B.key
右下角获取A表独有的加B表独有的,mysql数据库不支持 full outer join,mysql下可以这么写:
select * from tableA A left join tableB B on A.key=B.key where B.key is null
union
select * from tableA A right join tableB B on A.key=B.key where A.key is null