Using BINARY has the effect of causing [:lower:] and [:upper:] in regular expressions to act as you would expe
ct.
mysql>
mysql>
mysql> SELECT 'a' REGEXP '[[:upper:]]', BINARY 'a' REGEXP '[[:upper:]]';
+--------------------------+---------------------------------+
| 'a' REGEXP '[[:upper:]]' | BINARY 'a' REGEXP '[[:upper:]]' |
+--------------------------+---------------------------------+
| 1 | 0 |
+--------------------------+---------------------------------+
1 row in set (0.00 sec)
mysql>
mysql>
Related examples in the same category