Search code examples
mysqlucs2

mysql doesn't separate between e and è


There are two tables in mysql databse that use ucs2_slovenian_ci (that I can't change). How can I make sql that will recognize the differece between 'e' and 'è' and won't connect those rows with differet values?

SELECT tableA.value, tableB.value
FROM tableA
INNER JOIN tableB ON (tableA.value = tableB.value)

doesn't work.Thank you for your help


Solution

  • You could force a binary comparison:

    SELECT tableA.value, tableB.value
    FROM tableA
    INNER JOIN tableB ON tableA.value = BINARY tableB.value
    

    Please have a look at the binary operator page in the docs.