always chase after what I like, but never forget what I dream of."

MYSQL的几种连接查询

1.等值连接(内连接)

TIM截图20171102231957    1

  

2.自连接

2

 

3.自然连接

3

 

4.外连接(省略左外连接和右外连接)

4

 

5.合并查询数据记录

UNION  会去掉重复项
UNION  ALL 不会去掉重复项

6

 

6.子查询(效率远高于连接查询)

7    8

带关键字的子查询

9

posted @ 2017-11-02 23:53  zx1116  阅读(11211)  评论(0编辑  收藏  举报

always chase after what I like, but never forget what I dream of."