Mysql sorts the SQL code www.2cto.com/* Navicat MySQL Data Transfer Source Server: local Source Server Version: 50022 Source Host: localhost: 3306 Source Database: test Target Server Type: MYSQL Target Server Version: 50022 File Encoding: 65001 Date: 2012-11-19 15:46:13 */SET FOREIGN_KEY_CHECKS = 0; -- -------------------------- -- Table structure for 'body' -- dropping drop table if exists 'body '; create table 'People' ('id' int (10) unsigned not null auto_increment, 'name' varchar (20) default NULL, primary key ('id ')) ENGINE = InnoDB default charset = utf8; -- ---------------------------- -- Records of person -- ---------------------------- insert into 'person 'values ('1', 'zhang san '); insert into 'person 'values ('2', 'lily'); insert into 'person 'values ('3', 'wang 5 '); insert into 'person 'values ('4', 'ma 6'); insert into 'person 'values ('5', 'Qian 7'); Forward order: select * from person order by convert (name USING gbk); Result: 2 LI 4 4 Ma 6 5 yuan 7 3 Wang 5 1 Zhang 3 inverted ORDER: select * from person order by convert (name USING gbk) result of desc: 1 Zhang San 3 Wang Wu 5 Qian Qi 4 Ma 6 2 LI 4