mysql join&union
0.表数据
1.innerJoin(取交集)
图:
sql: select * from A inner join B on A.name=b.name;
结果:
2.leftJoin
图:
sql: select * from A left join B on a.name=b.name;
结果:
2.rightJoin
图:
sql:select * from A right join B on a.name=b.name;
结果:
3.fullJoin (笛卡尔积) mysql版本:
描述:
sql:select * from A full join B;
结果:
4.union(distinct)
5.unionAll
Note:
win10 64bit mysql 5.7.32