1. inner join 内连接查询
SELECT a.,b. FROM table_a a INNER JOIN table_b b ON a.id=b.id;
2. left join 左关联查询
SELECT a.,b. FROM table_a a LEFT JOIN table_b b ON a.id=b.id;
3.right join 右关联查询
SELECT a.,b. FROM table_a a RIGHT JOIN table_b b ON a.id=b.id;
4.左连接-内连接
SELECT a.,b. FROM table_a a LEFT JOIN table_b b ON a.id=b.id WHERE b.id IS NULL;
5. 右连接-内连接
SELECT a.,b. FROM table_a a RIGHT JOIN table_b b ON a.id=b.id WHERE a.id IS NULL
————————————————