当前位置:网站首页>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
边栏推荐
- Advanced transfer learning
- 程序员如何快速开发高质量的代码?
- Sentinel rule persistence into Nacos
- Seata处理分布式事务
- Redis common interview questions
- c1000k TCP 连接上限测试1
- Quick start to static class variables
- Network protocol: SCTP flow control transmission protocol
- Sword finger offer II 116 Number of provinces - spatial complexity O (n), time complexity O (n)
- How can programmers quickly develop high-quality code?
猜你喜欢
![[today in history] April 23: the first video uploaded on YouTube; Netease cloud music officially launched; The inventor of digital audio player was born](/img/0a/ed4eab6589e1c072edc247463e889e.png)
[today in history] April 23: the first video uploaded on YouTube; Netease cloud music officially launched; The inventor of digital audio player was born

c#:泛型反射

mysql_ Download and installation of Linux version

PyGame tank battle

12 examples to consolidate promise Foundation

ESP32 LVGL8. 1 - checkbox (checkbox 23)

ESP32 LVGL8. 1. Detailed migration tutorial of m5stack + lvgl + IDF (27)

Raspberry pie 18b20 temperature

mysql_linux版本的下载及安装详解

I just want to leave a note for myself
随机推荐
ESP32 LVGL8. 1 - checkbox (checkbox 23)
Advanced transfer learning
Some records used by VS2010
Esp32 (UART receiving and sending) - receiving and sending communication of serial port (4)
The difference between ordinary inner class and static inner class
简化路径(力扣71)
Solutions such as unknown or garbled code or certificate problem prompt in Charles's mobile phone packet capture, actual measurement.
WebView saves the last browsing location
Sentinel服务熔断实战(sentinel整合ribbon+openFeign+fallback)
8266 obtain 18b20 temperature
The corresponding permissions required to automatically open the app in the setting interface through accessibility service
mysql_linux版本的下载及安装详解
PyGame tank battle
Sentinel rule persistence into Nacos
Sentinel service fusing practice (sentinel integration ribbon + openfeign + fallback)
JVM的类加载过程
Zlib realizes streaming decompression
Scrollto and scrollby
Raspberry pie 18b20 temperature
MySQL restores or rolls back data through binlog