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

24 lines
750 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
单表有条件查询
# 一、概述
1. 语法格式:```
```sql
SELECT [ALL|DISTINCT]
FROM
WHERE
```
2. 条件表达式中的运算符
1. 比较运算符:=、<、>、<=、>=、<>、!=、!<、!>
2. 范围运算符between、and、not between、and
3. 列表运算符in、not in
4. 字符匹配符like、not like
5. 空值is null、is not null
6. 逻辑运算符and、or、not
# 二、条件中表示数值范围
1. 比较运算符+逻辑运算符
2. 范围运算符(范围大推荐)
3. 列表运算符
# 三、条件中出现匹配条件
1. 字符匹配符
2. 通配符
1. \_ 单个下划线:单个任意字符
2. % 百分号0个或多个任意字符