Stas Bichenko
Stas Bichenko

Reputation: 13273

MySQL sorting: how to make Cyrillic characters go before Latin characters?

I'm using MySQL to store Cyrillic and Latin strings. I want to display all these strings in a list, sorted alphabetically. However, they are currently sorted according to the first character like that:

  1. Numbers
  2. Latin characters
  3. Cyrillic characters

I'd like Cyrillic characters to go before Latin characters. How can I do this?

Upvotes: 1

Views: 1706

Answers (1)

Kaivosukeltaja
Kaivosukeltaja

Reputation: 15735

To keep things efficient, I think the best way would be to create a custom collation.

Upvotes: 1

Related Questions