标签:inner sel word 连接查询 查询 pass sele span 结构
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.自连接查询 为了省表, 主--从关系结构
标签:inner sel word 连接查询 查询 pass sele span 结构
原文地址:https://www.cnblogs.com/chencn/p/12303324.html