Like Case Sensitive in MySQL

后端 未结 8 2417
离开以前
离开以前 2020-11-29 06:38

I have a MySQL query:

SELECT concat_ws(title,description) as concatenated HAVING concatenated LIKE \'%SearchTerm%\';

And my table is encode

8条回答
  •  没有蜡笔的小新
    2020-11-29 06:51

    This problem is occurring in this case because of the collation used in the table. You have used utf8_general_ci as collation. If the collation is changed to utf8_general_ci then the searches will not be case sensitive. So, one possible solution is to change the collation.

提交回复
热议问题