Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Brand New我在列中有一行condition,当我进行如下查询时,它不会返回任何内容,
Brand New
condition
SELECT * FROM table where condition LIKE '%new%'
但如果我这样做,我会得到那一行
SELECT * FROM table WHERE condition LIKE '%Brand New%'
我在这里想念什么?
列的排序规则conditon是latin1_swedish_ci
conditon
latin1_swedish_ci
尝试这个:
SELECT * FROM table where LOWER(`condition`) LIKE LOWER('%new%');
您很可能有区分大小写的设置。
这将在比较它们之前将两个字符串转换为小写。
Reference page
这将解决问题:
"SELECT * FROM table WHERE `condition` LIKE '%new%'"