|
mysql版本是Server version: 5.0.37-community MySQL Community Edition (GPL)
自己建了个表
+-------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | char(20) | NO | | | |
| price | varchar(10) | YES | | NULL | |
+-------+-------------+------+-----+---------+----------------
插入了点数据
+----+-----------+--------+
| id | name | price |
+----+-----------+--------+
| 1 | toy | 234.3 |
| 2 | cellphone | 2344.3 |
| 3 | book | 455 |
| 4 | book | NULL |
+----+-----------+--------+
然后奇怪的事情来了,
select max(price) from produce; //查询最大的价格
结果是这个
+------------+
| max(price) |
+------------+
| 455 |
+------------+
明明应该是2344.5啊 怎么最大的价格变成455了
郁闷了,谁知道是什么原因伐 |
|