当前位置:网站首页>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
边栏推荐
- mysql_linux版本的下载及安装详解
- An 8266 crash
- Is it safe to open an account in Bohai futures.
- 【历史上的今天】4 月 23 日:YouTube 上传第一个视频;网易云音乐正式上线;数字音频播放器的发明者出生
- Esp32 (UART receiving and sending) - receiving and sending communication of serial port (4)
- FTP, SSH Remote Access and control
- ESP32 LVGL8. 1 - arc (arc 19)
- Openharmony open source developer growth plan, looking for new open source forces that change the world!
- #yyds干货盘点#stringprep --- 因特网字符串预备
- 7、 DOM (Part 2) - chapter after class exercises and answers
猜你喜欢
Raspberry pie uses root operation, and the graphical interface uses its own file manager
MySQL Téléchargement et installation de la version Linux
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
Class loading process of JVM
Simple use of navigation in jetpack
Esp32 (UART 485 communication) - 485 communication of serial port (3)
ESP32 LVGL8. 1 - input devices (input devices 18)
ESP32 LVGL8. 1 - roller rolling (roller 24)
2022.04.23 (lc_763_divided into letter interval)
Installation, use and problem summary of binlog2sql tool
随机推荐
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
C: generic reflection
电路在线模拟
mysql_linux版本的下載及安裝詳解
Esp32 (UART receiving and sending) - receiving and sending communication of serial port (4)
Introduction to ROS learning notes (II)
Introduction to ROS learning notes (I)
SSDB基础1
12 examples to consolidate promise Foundation
Esp32 (UART 485 communication) - 485 communication of serial port (3)
C1000k TCP connection upper limit test 1
redis优化系列(三)解决主从配置后的常见问题
After opening the original normal project, the dependency package displays red and does not exist.
Feature selection feature_ selection--SelectKBest
开关电源设计分享及电源设计技巧图解
Go 语言 GUI 框架 fyne 中文乱码或者不显示的问题
浅谈c语言指针的强制转换
Download xshell 6 and xftp6 official websites
Fundamentals of machine learning theory -- some terms about machine learning
Redis common interview questions