MS Update如何批操作同一个表 我原来写的如下有报错 update table1 set 金额=金额+a.余额 from table1 a where 日期=今天 and a.日期=昨天 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 update table1 set 金额=金额+(select 余额 from table1 B where B.日期=昨天 table1.id=B.id) where 日期=今天 update aset a.金额=a.金额+b.余额from table1 a,(select 余额 from table1 where 日期=昨天) bwhere a.日期=今天 怎样查询出记录数大于10万条记录的所有表的表名称? 这个SQL语句该怎么写? 有困难的存储过程 sql如何操作这个字符串? 在asp中操作行转列的问题。把一个日程计划转换成按星期表述。 bit型的数据,怎么把它取反! SQLSERVER的客户端软件 安装sql server 问题 关于在Access中用Undate语句? 一个使用聚合函数的查询语句 求一个查询语句 SQL server2005启动问题
set 金额=金额+(select 余额 from table1 B where B.日期=昨天 table1.id=B.id)
where 日期=今天
set a.金额=a.金额+b.余额
from table1 a,(select 余额 from table1 where 日期=昨天) b
where a.日期=今天