日期:2014-05-16  浏览次数:20742 次

mysql 按拼音首字母排序的查询语句

?数据表某字段client_name的字符编码是utf8_general_ci;

SELECT  *  FROM  `client_info_msg`   ORDER BY CONVERT( client_name USING gbk ) COLLATE gbk_chinese_ci ASC; 

?

某字段name的字符编码是latin1_swedish_ci;

select  *  from `tbl` order by birary(name) asc 

?

?

?