MySql REGEXP statement

The mySql REGEXP statement is not case sensitive. Is there a version of this operator in which case sensitive?

+3
source share
1 answer

Use a keyword BINARYthat makes the REGEXPstring match a binary string that is case sensitive.

SELECT 'a' REGEXP 'A', 'a' REGEXP BINARY 'A';

Although this is not explicitly stated in the docs (that you can do it with the usual string), in my experience it works as expected.

+5
source

All Articles