日期:2014-05-18 浏览次数:20563 次
update Sale set bounds=b.bounds from (select ID,sum(amount*price*0.05) as bounds from product group by ID)b where Sale.ID=a.ID
------解决方案--------------------
update set bounds=b.bounds from Sale a join (select ID,sum(amount*price*0.05) as bounds from product group by ID)b on a.ID=a.ID