在mySQL数据库中搜索%20

Gra*_*ham 1 mysql phpmyadmin

我试图通过phpmyadmin搜索我的数据库中包含%20的任何行.这是我的查询:

select * from `jos_picmicro_content` where `introtext` like '\%20' escape '\';
Run Code Online (Sandbox Code Playgroud)

除外它返回以下错误:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''\'' at line 1
Run Code Online (Sandbox Code Playgroud)

我做错了什么?

Dor*_*Dor 5

你逃脱了'.正确的语法是:

select * from `jos_picmicro_content` where `introtext` like '\%20' escape '\\';
Run Code Online (Sandbox Code Playgroud)

为了快速识别问题,请将查询划分为不同的行,例如:

select * from `jos_picmicro_content` 
where `introtext` 
like '\%20' 
escape '\\';
Run Code Online (Sandbox Code Playgroud)

然后MySQL将警告问题在哪一行.