oracle merge into
merge into
merge into base_monitor_device m
using(
select s.moni_device_id,s.moni_device_name,t1.daxiong,t1.azwz from base_monitor_device s
left join stationtable1 t1
on s.moni_device_name=t1.daxiong
) n on( m.moni_device_id=n.moni_device_id )
when matched
then
update set m.install_site=n.azwz;
根据匹配项得出ID,再根据匹配到的ID插入数据