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%'"