0

I would like to look up data from my table, which includes varchar strings with mutations like "ö, ü, ä", so I've changed the charset to "utf8_general_ci" (because I expected, it'll work), but when I send a query to the table like

SELECT * FROM table WHERE column='%ü%'

it returns all rows in the table, even if the cell doesn't contain any 'ü'.

Why does it return every row and how can I fix it?

Jon Lamer
  • 408
  • 6
  • 12
  • `utf8_general_ci` isn't a database `charset`, it's a `collation`; `charset` should be `utf8` - read [UTF-8 all the way through](http://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – Mark Baker Jan 11 '14 at 21:27

1 Answers1

1

There may be a better solution but this might help

SELECT * FROM table WHERE column='%ü%' collate utf8_bin
Abhik Chakraborty
  • 44,654
  • 6
  • 52
  • 63