当前位置:网站首页>SQL query statement
SQL query statement
2022-06-26 06:57:00 【My talented girlfriend】
The basic query
- Specified field
select Field A, Field B from surface
- Query all fields
select * from surface
Query data filtering
- Simple filtering
Operator | Example |
---|---|
= | id = 1 |
!= or <> | sex != 1 |
>= 、> 、<、<= | salary > 1000 |
BETERRN | salary between 100 and 200 |
IN | name IN(‘ Cherish ’,‘ Barbarian ’) |
- A null value judgment
select * from user where name is null
- Text blur
Use like matching ,% matching 0 Or more than one character ,_ Match a character
select * from user where name like '%i'
- Combinatorial logic
AND OR NOT - duplicate removal
DISTINCT
Sort
order by –
ASC: Ascending ( Default )
DESC: Descending
Qualified result set
Here is mysql How to write a sentence ,limit Specify the quantity ,offset Specify where to start , That's the offset , The default is 0 Start
select Field from Table name order by Field limit a offset b
notes
- – Two hyphens
- /* */ Used for multi line comments
边栏推荐
- 浅析一道经典题
- 直播预告丨消防安全讲师培训“云课堂”即将开讲!
- Numpy learning challenge level 4 - numpy array attribute
- JS download pictures
- Paths with a certain value in a binary tree (1) (2) (3) (Sword finger offer)
- LabVIEW Arduino tcp/ip remote smart home system (project part-5)
- Research Report on market development prospect and investment strategy of China's water soluble film industry 2022-2027
- Mysql delete in 不走索引的
- Shell编程-用户信息管理
- China polyphenylene oxide Market Development Prospect and Investment Strategy Research Report 2022-2027
猜你喜欢
Mysql操作数据库
【元胞自动机】基于元胞自动机实现高速公路收费站交通流问题附matlab代码
高德地图使用自定义地图无效问题
【图像检测】基于Itti模型实现图像显著性检测附matlab代码
Numpy learning challenge level 4 - numpy array attribute
Analyse d'un problème classique
When vs code uses prettier to format JS, there is a space between the name of the function definition and the parentheses, and ESLIt does not allow this space
Load balancer does not have available server for client: userService问题解决
闭包问题C# Lua
[image fusion] MRI-CT image fusion based on gradient energy, local energy and PCA fusion rules with matlab code
随机推荐
同步通信和异步通信的区别以及优缺点
宝塔服务器搭建及数据库远程连接
OCA Security Alliance (cybersecurity mesh)
NumPy学习挑战第五关-创建数组
Guide to "avoid dismissal during probation period"
分析 NFT 项目的 5 个指标
Lightgbm-- parameter adjustment notes
我在腾讯做测试的这几年...
Operation mode and investment planning report of China's financial warehousing industry during the "14th five year plan" period 2022-2027
浅析一道经典题
遇到女司机业余开滴滴,日入500!
[golang] time related
二叉树中和为某一值的路径(一)(二)(三)(剑指offer)
专业课-代码题记录
Load balancer does not have available server for client: userService问题解决
Marketing skills: compared with the advantages of the product, it is more effective to show the use effect to customers
C# Nuget离线缓存包安装
Go learning notes 1.3- data types of variables
STM32F1与STM32CubeIDE编程实例-热敏传感器驱动
高德地图使用自定义地图无效问题