56,678
社区成员
发帖
与我相关
我的任务
分享
mysql> show full columns from x;
+-------+-------------+-------------------+------+
| Field | Type | Collation | Null |
+-------+-------------+-------------------+------+
| id | int(11) | NULL | NO |
| c1 | varchar(30) | gb2312_chinese_ci | YES |
| c2 | varchar(30) | gb2312_bin | YES |
+-------+-------------+-------------------+------+
3 rows in set (0.02 sec)
mysql>
mysql> select * from x;
+----+--------+--------+
| id | c1 | c2 |
+----+--------+--------+
| 1 | A1000 | A1000 |
| 2 | a2000 | a2000 |
| 3 | A3000 | A3000 |
| 4 | 中000 | 中000 |
| 5 | 不000 | 不000 |
| 6 | A音000 | A音000 |
+----+--------+--------+
6 rows in set (0.03 sec)
mysql> select * from x order by c1;
+----+--------+--------+
| id | c1 | c2 |
+----+--------+--------+
| 1 | A1000 | A1000 |
| 2 | a2000 | a2000 |
| 3 | A3000 | A3000 |
| 6 | A音000 | A音000 |
| 5 | 不000 | 不000 |
| 4 | 中000 | 中000 |
+----+--------+--------+
6 rows in set (0.00 sec)
mysql> select * from x order by c2;
+----+--------+--------+
| id | c1 | c2 |
+----+--------+--------+
| 1 | A1000 | A1000 |
| 3 | A3000 | A3000 |
| 6 | A音000 | A音000 |
| 2 | a2000 | a2000 |
| 5 | 不000 | 不000 |
| 4 | 中000 | 中000 |
+----+--------+--------+
6 rows in set (0.00 sec)
mysql>