![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MYSQL
Amokr_
这个作者很懒,什么都没留下…
展开
-
[REGEXP] - regular expresion 正则表达式
SELECT *FROM customersWHERE last_name LIKE '%field%'<=>SELECT *FROM customersWHERE last_name REGEXP 'field''^ + 字符串' ---> 限定以某字符串开头SELECT *FROM customersWHERE last_name REGEXP '^field'‘字符串 + $’ ---> 限定以某字符...原创 2022-01-24 03:04:01 · 204 阅读 · 0 评论 -
[LIKE]
不管后续长度与大小写%在左侧, 指定B或b开头的人SELECT *FROM customersWHERE last_nameLIKE 'b%'%在中间SELECT *FROM customersWHERE last_nameLIKE '%b%'%在右侧, 指定y结尾的人SELECT *FROM customersWHERE last_nameLIKE '%y'...原创 2022-01-24 00:48:11 · 460 阅读 · 0 评论 -
[BETWEEN]
BETWEEN 包含临界值SELECT *FROM customersWHERE points >= 1000 AND points <= 3000<=>SELECT *FROM customersWHERE points BETWEEN 1000 AND 3000原创 2022-01-24 00:30:40 · 159 阅读 · 0 评论 -
[IN] substitute a series of OR
SELECT *FROM customersWHERE state = 'VA' OR state = 'GA' OR state = 'FL'<=>SELECT *FROM customersWHERE state in ('VA', 'FL', 'GA')SELECT *FROM customersWHERE state NOT IN ('VA', 'FL', 'GA') homeworkSELECT *FROM product...原创 2022-01-24 00:28:14 · 137 阅读 · 0 评论 -
[AND] [OR] [NOT]
ANDSELECT * FROM CustomersWHERE birth_date >= '1990-01-01' AND points > 1000ORSELECT * FROM CustomersWHERE birth_date >= '1990-01-01' OR points > 1000SELECT * FROM CustomersWHERE birth_date > '1990-01-01' OR (poi原创 2022-01-24 00:18:55 · 113 阅读 · 0 评论 -
[SELECT] [WHERE] 语句
USE sql_store;SELECT * FROM customersWHERE customer_id = 1ORDER BY first_name-- 不区分大小写,子句换行无影响原创 2022-01-23 02:28:30 · 424 阅读 · 0 评论