Mysql----8

Posted Alex_TD

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mysql----8相关的知识,希望对你有一定的参考价值。

1.联表查询   必须多表要有相同的列 (多表查询)

   select  a.name,sex,password from 表1 as a inner join  表2  as b on a.name=b.name;---

   select   a.name ,password, sex from 表1 as a left join 表2  as  b  on a.name=b.name;---左表基准全查

   select  a.name ,password,sex from 表1 as a  right join 表2  as b on  a.name= b.name where password is null;---右表基准全查

2.自连接查询  为了省表, 主--从关系结构

 

以上是关于Mysql----8的主要内容,如果未能解决你的问题,请参考以下文章