Mysql – How to make SQL case sensitive string comparison on MySQL

case-sensitiveinteropMySQLsqlstring-comparison

I have a function that returns five characters with mixed case. If I do a query on this string it will return the value regardless of case.

How can I make MySQL string queries case sensitive?

Best Answer

The good news is that if you need to make a case-sensitive query, it is very easy to do:

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