我想查询问题以'\'结尾的所有user_questions。
我尝试了以下但是它们似乎都没有效果。所有这些都返回空结果。
select * from user_question where question like "%\\"
select * from user_questions where question like "%[\]"
select * from user_questions where question like "%\\\\"
select * from user_questions where question like "%[\\]"
我正在使用mysql workbench 6.0.7
mysql - How to handle query search with special characters /(forward slash) and \(backslash)
答案 0 :(得分:0)
select * from user_questions where question like "%\\\\"
这个应该可以工作,我自己测试一下。
答案 1 :(得分:0)
你试过这个吗?
select *
from user_question
where right(question, 1) = '\\';