当前位置:网站首页>SQL server requires to query the information of all employees with surname 'Wang'
SQL server requires to query the information of all employees with surname 'Wang'
2022-04-23 19:08:00 【Little brother】
For recent projects, the last name is required to be queried ‘ Li ’ Employee information , According to what I learned earlier LIKE '% millet %' This statement , Query all the content about Xiaomi , also
It's called fuzzy query .
%: Represents any string length
_: Represents the length of a single string
Because the surname Li can't all be 2 A word Li X, It could be 3 A word Li XX, So we can't use LIKE '_ Li _' , But to use. LIKE '% Li %'
And what we want to check is the surname Li, not the name related to li , therefore LIKE '% Li %' To write LIKE ' Li %'
select * from Table WHERE Name like ' Li %'
So all the people surnamed Li have been found out .
summary :
LIKE '% Li %' :‘ Li ’ Add... Around the word % Express ‘ Li ’ word There can be words on the left , There can also be words on the right , You can also have words on only one side or no words at all , This is
Is to query all and ‘ Li ’ Word related content .
LIKE ' Li %' :‘ Li ’ Add... To the right of the word % Express ‘ Li ’ word There can be words or no words on the right , This is the query to ‘ Li ’ word Content at the beginning
LIKE '% Li ' :‘ Li ’ Add... To the left of the word % Express ‘ Li ’ word Left The side can have words or no words , This is the query to ‘ Li ’ word Ending content
版权声明
本文为[Little brother]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210601423166.html
边栏推荐
- std::stoi stol stoul stoll stof stod
- The type initializer for ‘Gdip‘ threw an exception
- Esp32 (UART 485 communication) - 485 communication of serial port (3)
- C1000k TCP connection upper limit test
- SSDB Foundation
- Fundamentals of machine learning theory -- some terms about machine learning
- Esp32 (UART event) - serial port event learning (1)
- Simplified path (force buckle 71)
- 7、 DOM (Part 2) - chapter after class exercises and answers
- 【玩转Lighthouse】腾讯云轻量服务器搭建全平台视频解析视频下载网站
猜你喜欢
Eight bit binary multiplier VHDL
[advanced level 11 of C language -- character and string functions and their simulation implementation (2)]
The fifth bullet of MySQL learning -- detailed explanation of transaction and its operation characteristics
Getting started with vcpkg
Wechat applet part of the mobile phone Preview PDF did not respond
Client interns of a large factory share their experience face to face
Keysight has chosen what equipment to buy for you
FTP, SSH Remote Access and control
ArcMap连接 arcgis server
微搭低代码零基础入门课(第三课)
随机推荐
Partage de la conception de l'alimentation électrique de commutation et illustration des compétences en conception de l'alimentation électrique
[记录]TypeError: this.getOptions is not a function
c1000k TCP 连接上限测试
12 examples to consolidate promise Foundation
ESP32 LVGL8. 1 - input devices (input devices 18)
Nacos作为服务注册中心
ArcMap连接 arcgis server
ESP32 LVGL8. 1 - msgbox message box (msgbox 28)
从技术体系到商业洞察,中小研发团队架构实践之收尾篇
Deeply understand what new and make in golang are and what are the differences?
Tencent map and high logo removal method
MySQL statement
Fundamentals of machine learning theory -- some terms about machine learning
Simplified path (force buckle 71)
mysql_linux版本的下载及安装详解
Using Visual Studio code to develop Arduino
Using 8266 as serial port debugging tool
SSDB基础
该买什么设备,Keysight 给你挑好了
Sentinel rule persistence into Nacos