34,588
社区成员
发帖
与我相关
我的任务
分享
update a set quantity=50 from a inner join b on a.code=b.code where b.inno='a001'
更新用
update a
set quantity =50
from b
where a.code=b.code and b.inno='a001'
select a.code,b.inno,a.quantity
from a
inner join b on a.code=b.code and b.inno='a001'
;with aaa as
(select a.code,a.quantity from a inner join b on a.code=b.code and b.inno='a001')
update aaa set quantity=50
--lz你既然有限制条件,没看出来你这个left join用的有什么意义
update a set quantity=50
from a join b on (a.code=b.code)
where b.inno='a001'
update a
set quantity=50
where code in(select code from b where inno='a001')
update a set quantity=50 from a left join b on a.code=b.code where b.inno='a001'