Ricky Mathew Ricky Mathew - 4 months ago 8
SQL Question

sql '=' operetor returns unexpected result

here is my query

SELECT *
FROM `tx_branddata_info`
WHERE `brand_title` = 'BOEHLER'
LIMIT 0 , 30


it returns

enter image description here

but the expected result is the first one.any one have any solution other than changing the collation.

Answer

Seems brand_title 's following latin1_german2_ci rules (http://dev.mysql.com/doc/refman/5.7/en/charset-we-sets.html):

Ä = AE
Ö = OE
Ü = UE
ß = ss

Check field character set and change, if you can obviously, to, imho, utf8mb4.

Hope this helps.