Sep 10 2009

Mysql 按拼音排序

Category: 技术ssmax @ 15:18:10

永久解决方案:

用gbk建表,或者指定gbk字段,mysql 5.x支持某列单独定义字符集。

临时解决方案:

SELECT * FROM table ORDER BY CONVERT( chinese_field USING gbk ) ;

 

今天转换sql server 项目遇到的问题,记录一下,呵呵

One Response to “Mysql 按拼音排序”

  1. 佐佐木屎壳郎 says:

    原来还可以这样
    up~

Leave a Reply

*
To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
Click to hear an audio file of the anti-spam word