日期:2014-05-16 浏览次数:20820 次
mysql> desc t_a175460677;
+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| uName | char(3) | YES | | NULL | |
| money | float(10,2) | YES | | NULL | |
+-------+-------------+------+-----+---------+-------+
2 rows in set (0.06 sec)
mysql>
mysql> select * from t_a175460677;
+-------+-------+
| uName | money |
+-------+-------+
| 701 | 0.01 |
| 701 | 6.01 |
+-------+-------+
2 rows in set (0.06 sec)
mysql> update t_a175460677 set money=money-0.01 where uName='701';
Query OK, 2 rows affected (0.06 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> select * from t_a175460677;
+-------+-------+
| uName | money |
+-------+-------+
| 701 | 0.00 |
| 701 | 6.00 |
+-------+-------+
2 rows in set (0.00 sec)
mysql>