I have Arabic words in my database:
Example:
أحمد يحيى
احمد اسعد
The question is:
I want to get the names sorted by name.
The expected result is:
احمد اسعد
أحمد يحيى
But I got:
أحمد يحيى
احمد اسعد
أ
before ا
I tried this
select name from emp order by name;
please help.
Can you please check your database collations, they should either be set to utf8_general_ci or utf8_unicode_ci. This should let you perform order by etc correctly.
If running a stand alone query try this:
SET NAMES 'utf8';
SET CHARACTER SET utf8;
select name from emp order by name;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With