Mega Code Archive

 
Categories / MySQL Tutorial / String Functions
 

String comparisons are not case sensitive unless one of the operands is a binary string

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>