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

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.