数据库_表连接:Join
关于联表的概念:
内联(Inner Join):
SELECT * FROM A
INNER JOIN B ON A.id=B.id;
左联表(Left Join):
![](https://img2020.cnblogs.com/blog/1519407/202009/1519407-20200915172842006-1102604661.png)
SELECT * FROM A
LEFT JOIN B ON A.id=B.id;
右联表(Right Join):
![](https://img2020.cnblogs.com/blog/1519407/202009/1519407-20200915172924670-1056529921.png)
SELECT * FROM A
RIGHT JOIN B ON A.id=B.id;
全联(Full Join):
![](https://img2020.cnblogs.com/blog/1519407/202009/1519407-20200915173026138-1236549406.png)
SELECT * FROM A
FULL JOIN B ON A.id=B.id;
https://www.ruanyifeng.com/blog/2019/01/table-join.html
posted on 2020-09-15 17:31 ng机械化卡拉库里咯博透 阅读(113) 评论(0) 编辑 收藏 举报