当前位置: 技术问答>linux和unix
请看看,谢谢
来源: 互联网 发布时间:2016-06-20
本文导语: mysql> select *from TBbook1; |number|name|money| left | +--------+------+---------+--------+ | 3 | cc | 12 | 9 | | 4 | dd | 30 | 10 | +--------+------+---------+--...
mysql> select *from TBbook1;
|number|name|money| left |
+--------+------+---------+--------+
| 3 | cc | 12 | 9 |
| 4 | dd | 30 | 10 |
+--------+------+---------+--------+
请问:使用命令把left这一列的数字-1,该怎么写阿?
谢谢!
|number|name|money| left |
+--------+------+---------+--------+
| 3 | cc | 12 | 9 |
| 4 | dd | 30 | 10 |
+--------+------+---------+--------+
请问:使用命令把left这一列的数字-1,该怎么写阿?
谢谢!
|
select number, name, money, left - 1 from TBbook1;
|
select number, name, money, left - 1 from TBbook1 where number=3;
|
学习..