SQL Server:
update RCSRelease_Head set Req_User_Id =b.Applier_ID from RCSRelease_Head a,RCSApply_Head b where b.Release_No=a.Release_No
Oracle:
update test a
set (a.prdn_st,avg_yield)=(select b.prd_st,b.avg_yield
from test11 b
where a.prd_no=b.prd_no and a.plant=b.plant )
where exists (select 1 from test11 b where a.plant=b.plant )--这行不加可能会执行不成功,报错ora-01407
update RCSRelease_Head set Req_User_Id =b.Applier_ID from RCSRelease_Head a,RCSApply_Head b where b.Release_No=a.Release_No
Oracle:
update test a
set (a.prdn_st,avg_yield)=(select b.prd_st,b.avg_yield
from test11 b
where a.prd_no=b.prd_no and a.plant=b.plant )
where exists (select 1 from test11 b where a.plant=b.plant )--这行不加可能会执行不成功,报错ora-01407