Oracle做关联更新
在Oracle中做关联更新比在Sql Server麻烦很多,
关联两表更新,非得这样不可,着实有点郁闷...
Update t_Gd_Warebase
set WareQty = (select sum(B.QtyKY) From t_Gd_Warebase A,T_GD_WareDeta B
where A.MateNo = B.MateNo and A.WareType = B.WareType and A.MateNo = 'A002' and A.WareType = 'ZS'
group by B.MateNo,B.WareType)
Where MateNo = 'A002' and WareType = 'ZS'
关联两表更新,非得这样不可,着实有点郁闷...
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)