MySQL escape Escape means the original semantics of the escape character. The purpose of an escape character is to start a character sequence so that the character sequence starting with the escape character has different semantics than when the character sequence appears alone. In the SQL LIKE statement, for example select * from user where username like '%nihao%',select * from user where username like '_nihao', Among them, % is used as a wildcard to match multiple characters, and _ is used as a wildcard to match only one character. If you really want to search for usernames that contain % _ , you need to stop using them as wildcards. Escape % _ in like, take _ as an example,
#Case 3: Query the employee names whose second character is _ SELECT last_name FROM employees WHERE last_name LIKE '_$_%' ESCAPE '$'; This is the end of this article about the use of MYSQL escape. For more information on the use of MYSQL escape, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Mini Program to implement Token generation and verification
>>: Detailed explanation of the practical use of HTML table layout
Preface: The installation process will not be des...
The following code introduces MySQL to update som...
Table of contents After creating a container loca...
Table of contents Preface Common methods 1. Modif...
The problems and solutions encountered when insta...
1. According to the online tutorial, the installa...
Table of contents Docker Installation Nvidia-dock...
Table of contents Preface 【undo log】 【redo log】 【...
In the previous article, I introduced how to solv...
Unzip the file into a directory This is the direc...
1. v-on event monitoring To listen to DOM events,...
1: Install SVN yum install -y subversion 2. Creat...
In CSS files, sometimes you need to use background...
The one I wrote before is too complicated, let’s ...
This article shares the specific code of Vue+expr...