Link to home
Start Free TrialLog in
Avatar of phipsta
phipsta

asked on

MySQL Case Sensitivity with BINARY VALUES

I have some binary data that i want to convert to lower or upper case to compare to a string.

SELECT myBinaryData FROM table_a WHERE myBinaryData Like "UPPERCASE";

The string in the where clause will be mixed case as will the binary data, i would like to know if it is possible to convert them both to either lower or uppercase to make the comparison.

LCASE() or UPPER() does not seem to work with binary data values, is there any other solution to this? (No points for telling me to change my data type to non binary)
ASKER CERTIFIED SOLUTION
Avatar of Rob Siklos
Rob Siklos
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of phipsta
phipsta

ASKER

Your example given works like a dream. In fact you now don't need to convert the column to upper case as now both and treated like CHAr data types and the LIKE statement is not case sensitive.