SQL> select * from test_1;A
--------------------
a%b
ab已执行耗时0.015 秒SQL> select * from test_1 where a like '%\%b' escape '\';A
--------------------
a%b已执行耗时0.015 秒
--------------------
a%b
ab已执行耗时0.015 秒SQL> select * from test_1 where a like '%\%b' escape '\';A
--------------------
a%b已执行耗时0.015 秒
SELECT * FROM TABLE WHERE COL like '\%7%' escape '\'
后面escape '\'不可省
这里转义字符是自己定义的,如果字串中包含'\'的话,可以用其他字符代替
SELECT * FROM TABLE WHERE COL like '#%7%' escape '#'
我是tony