merge into a using b on (a.x=b.x)
when matched then update set a.b=a.b-b.b
另外我记得我用这样的方法执行有通过的,在发生一次错误后就不能能过了。怎么回事,我用的是oracle10G
when matched then update set a.b=a.b-b.b
另外我记得我用这样的方法执行有通过的,在发生一次错误后就不能能过了。怎么回事,我用的是oracle10G
========================================
那可以使用update操作
merge into a using b on (a.x=b.x)
when matched then update set a.b=a.b+b.b
when not matched then insert values (b.x,b.b) where (1<>1);