MySQL 按汉字拼音首字母排序

Posted by icoding168 on 2020-03-09 16:25:03

分类: MySQL  

在 MySQL 中按汉字拼音首字母排序并不是简单地 order by 就行了,还要先用 gbk 编码方案转换一下,如:

select * from user where 1 = 1 order by convert(full_name using gbk) asc