Files
MySQL-Study/数据库5.4.md
2025-11-14 13:25:18 +08:00

584 B
Raw Permalink Blame History

一、连接查询的类型

  1. 交叉连接
  2. 内连接MySQL中常用
  3. 左外连接
  4. 右外连接
  5. 全外连接

二、内连接

  1. SQL标准中规定的语法重点
select 字段名
from 1,[inner] join 2 on 连接条件表达式[······]
[where 条件表达式];
  1. 传统用法:
select 字段名
from 1, 2[, ······]
where 连接条件表达式;

三、左外连接

语法:

select 字段名
from 1, left [outer] join 2 on 连接条件表达式[······]
[where 条件表达式];