case sensitive query in mysql code example

Example 1: where case insensitive mysql

SELECT * FROM `table` WHERE LOWER(`Value`) = LOWER("THE_VALUE")

Example 2: select binary case sensitove

SELECT *  FROM `table` WHERE BINARY `column` = 'value'

Example 3: oracle sql select case insensitive

SELECT * FROM my_table WHERE upper(MY_COLUMN) = upper('my_string');

Example 4: where case insensitive like mysql

When searching for partial strings in MySQL with LIKE you will match case-insensitive by default.

SELECT name FROM users WHERE name LIKE 't%'

Tags:

Misc Example