update a set a.t+b.t, a.l+b.l, a.k+b.k
from a,b
where a.i=b.i
转为oralce 的update语句,怎么写,请高手指教.
from a,b
where a.i=b.i
转为oralce 的update语句,怎么写,请高手指教.
解决方案 »
- oracle 9i 如何查询数据库内存使用情况
- 浏览器中可以正常访问dbconsole,可是服务器端无法查看dbconsole的运行状态
- Oracle 复制表结构及数据 竟然丢失了默认值?
- archive/下的文件可以删除么??
- java直接连接oracle的怪!怪!怪!怪问题。。。。在线等高见
- 多次执行Execute会出现E_FAIL的错误
- ***如何通过delphi进行oracle的备份和恢复操作?另加200分!!!***
- 在sqlplus中如何调用存储过程?
- 分类(SORT)关键字过长
- 存储过程编码找出物料编码为“1”或“5”开头的物料对应的成本对象/产品为“8”或字母开头的成品关系;一共需出具2014-2017年4年对应清单
- oracle使用序列的问题
- 求一存储过程例子(用游标返回结果集)
set t=(select t from b where i=a.i),
l=(select l from b where i=a.i),
k=(select k from b where i=a.i)
where exists (select 1 from b where i=a.i)
update a set a.t = a.t+b.t, a.l = a.l+b.l, a.k = a.k+b.k
from a,b
where a.i=b.i
需要想加之后把新的值写上去?
set t=t+(select t from b where i=a.i),
l=l+(select l from b where i=a.i),
k=k+(select k from b where i=a.i)
where exists (select 1 from b where i=a.i)
using(select * from b) b
on(a.i = b.i)
when matched then update set a.t = a.t + b.t , a.l = a.l + b.l ,a.k = a.k + b.k
merge into a
using b
on (a.i=b.i)
when matched then set a.t=a.t+b.t,a.l=a.l+b.l,a.k=a.k+b.k;