How to Do Case-Insensitive Match With SQLite IN Operator?

You can do case-insensitive matches with SQLite IN (or NOT IN) operator by adding COLLATE NOCASE operator after an expression (that's to the left of IN or NOT IN operators), for example, like so:

FROM `table`
WHERE `column` COLLATE NOCASE IN ('foo', 'bar')

This will match all (case-insensitive) variations of the values specified to the right of IN (or NOT IN) operator.

Hope you found this post useful. It was published . Please show your love and support by sharing this post.