2015-08-03

MySQL - How to filter in a 'case sensitive' way

select *
from TABLE_NAME
where CONVERT( FIELD_NAME USING latin1) COLLATE latin1_general_cs  like 'a%'
;

(1) You convert your field to a latin collation (if not already... from UTF8 for example)
(2) You collate it using a case sensitive collation (..._cs)

No comments:

Post a Comment