For postgres
it works easily with ILIKE
but for mysql
I don't find, the only thing I get is cases like this:
SELECT * FROM <table> WHERE LOWER(<key>) LIKE LOWER('%<searchpattern>%')
Thus making all the results of the column and the queried value lowercase. Is there a simpler way or label for mysql
.
You can indicate the
COLLATE
to use in the statement. You would only have to indicate aCOLLATE
case insensitive. For example:You can also set the COLLATE of the column to be case insensitive so that you don't need to indicate it in the statement. For example:
There is a very simple way:
With the keyword Binary you will search for exactly that word.