如何在MySQL中排序非英语字符串? [英] How can I sort non-English strings in MySQL?

查看:93
本文介绍了如何在MySQL中排序非英语字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CREATE TABLE IF NOT EXISTS `gujarati` (
  `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

INSERT INTO `gujarati` (`name`) VALUES
('ક'),
('દિનેશ'),
('ખા'),
('ગા'),
('થા'),
('થ'),
('કા'),
('મયૂર'),
('છત્ર'),
('ત્ર'),
('ક્ષ'),
('તા'),
('એક'),
('બોલ્ડ'),
('જ'),
('ટી'),
('મી'),
('હા'),
('યા'),
('ના'),
('ધી'),
('સો'),
('લા'),
('ઝા'),
('ણ્ણા');

这是我存储古吉拉特语的表。如何在MySQL数据库中排序此数据?

This is my table that stores the Gujarati language. How can I sort this data in a MySQL database?

推荐答案

设置 gujarati 的表格排序规则与对应于该语言的表格排序规则,然后用 ORDER BY 进行排序 - 它应该是开箱即用的

Set the gujarati's table collation to the one coresponding to this language, then simply sort with ORDER BY - it's supposed to work out of the box

这篇关于如何在MySQL中排序非英语字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆