存在table1 table1表内有字段 date, a,b 示例如下 date a b 9:11 1 5
9:12 5 43
9:13 6 79
9:14 32 56
9:15 43 234
9:16 3 47>>>..............
9:35 4 43date是时间,能不能在数据库中增加一个字段c作为b-a的值
写出语句,谢谢
9:12 5 43
9:13 6 79
9:14 32 56
9:15 43 234
9:16 3 47>>>..............
9:35 4 43date是时间,能不能在数据库中增加一个字段c作为b-a的值
写出语句,谢谢
解决方案 »
- 【求助】数据库数据取出出现乱码
- mysql中data下数据还原
- 求一sql语句,可能很难
- 我安装了mysql,这是个数据库管理工具,数据库到哪里去弄呢?
- Found block with too small length(求救)
- phpMyAdmin的导出功能,能够指定具体的行数,且直接生产insert/update/replace语句,
- mysql外键设置问题,触发事件ON DELETE 如何设置为SET DEFAULT
- 高手帮忙,形如select '' as field1 ....union select field11 as field1中 ''产生的问题
- MySql 根据子类id提取所有父类修改
- server quit without updating PID file
- 数据库查询,急啊,在线等,各位帮帮小弟
- mysql索引之间的问题
查询出来的select date,a,b,(b-a)as c from table1加到表中的alter table table1 add c int;
update table1 set c=b-a;
select * from table1;
from table1
where (b-a)>123