| 全能ASP/PHP/ASP.NET主机,支持月付 | 专业 MSSQL 数据库空间,支持月付 | 专业 MySQL 数据库空间,支持月付 | 买域名,送MP3、MP4 |
| 高端软件开发 = 年薪十万不是梦 | 赛孚耐:软件保护加密专家 | 身份认证令牌USB KEY | 买空间,免费送域名(厦门中资源) |
我输入命令:
mysql> select jno from j order by city asc;
返回的结果是
+-----+
| jno |
+-----+
| J3 |
| J4 |
| J5 |
| J7 |
| J1 |
| J6 |
| J2 |
+-----+
其中,如果排列正确的话,J1应该排在最后的。可是它排前了,为什么?

难道是我人品问题??!!
这是我的结果:
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\long>D:
D:\>CD MYSQL
D:\mysql>CD BIN
D:\mysql\bin>mysql -u root -p
Enter password: ***
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22 to server version: 5.0.16-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use test
Database changed
mysql> select * from j;
+-----+----------+------+
| jno | jname | city |
+-----+----------+------+
| J1 | 三建 | 北京 |
| J2 | 一汽 | 长春 |
| J3 | 弹簧厂 | 天津 |
| J4 | 造船厂 | 天津 |
| J5 | 机车厂 | 唐山 |
| J6 | 无线电厂 | 常州 |
| J7 | 半导体厂 | 南京 |
+-----+----------+------+
7 rows in set (0.00 sec)
mysql> select jno,city from j order by city asc limit 1;
+-----+------+
| jno | city |
+-----+------+
| J1 | 北京 |
+-----+------+
1 row in set (0.00 sec)
mysql>
谢谢你一直的帮助,可能真的是我人品问题,或者是版本问题,我在我的电脑做了如下操作:
mysql> select *from j;
+-----+----------+------+
| JNO | JNAME | CITY |
+-----+----------+------+
| J1 | 三建 | 北京 |
| J2 | 一汽 | 长春 |
| J3 | 弹簧厂 | 天津 |
| J4 | 造船厂 | 天津 |
| J5 | 机车厂 | 唐山 |
| J6 | 无线电厂 | 常州 |
| J7 | 半导体厂 | 南京 |
+-----+----------+------+
7 rows in set (0.06 sec)
mysql> update j set city="天津" where jno="j3";
Query OK, 0 rows affected (0.02 sec)
Rows matched: 1 Changed: 0 Warnings: 0
mysql> update j set city="天津" where jno="j4";
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
mysql> select jno,city from j order by city asc limit 1;
+-----+------+
| jno | city |
+-----+------+
| J3 | 天津 |
+-----+------+
1 row in set (0.02 sec)
mysql> select jno,city from j order by city desc limit 1;
+-----+------+
| jno | city |
+-----+------+
| J2 | 长春 |
+-----+------+
1 row in set (0.02 sec)
它好像怎么查都不对。不过,真的很谢谢你。