1.表
编号 | 名称 | 返回 | 关键字 |
1 | 交叉连接 | 笛卡尔积 | cross join |
2* | 内连接 | 有效数据 | inner join |
3* | 左连接 | 左表全 | left join |
4* | 右连接 | 右表全 | right join |
5 | 全连接 | 左右表都全 | full join |
2.例句
根据博主(Bloger)查博文(Blog)及博主的一些属性
select br.id,br.nick_name,br.br.head bg.id,bg.title,bg.post_time from bloger br left join blog bg on br.blog_id=bg.id where br.age=20;
3.表达式(以左连接为例)
select 待查询内容 from 左表 left join 右表 on 连接条件 where 查询条件
4.根据谁查谁的返回就应该全
转载于:https://blog.51cto.com/lilin1991/1299017