String comparisons are not case sensitive unless one of the operands is a binary string : LIKE « String Functions « MySQL Tutorial
- MySQL Tutorial
- String Functions
- LIKE
mysql>
mysql> SELECT 'abc' LIKE 'ABC';
+------------------+
| 'abc' LIKE 'ABC' |
+------------------+
| 1 |
+------------------+
1 row in set (0.00 sec)
mysql>
mysql> SELECT 'abc' LIKE BINARY 'ABC';
+-------------------------+
| 'abc' LIKE BINARY 'ABC' |
+-------------------------+
| 0 |
+-------------------------+
1 row in set (0.00 sec)
mysql>