update customers a
set city_name=(select b.city_name from tmp_cust_city b where b.customer_id=a.customer_id)
where exists (select 1
from tmp_cust_city b
where b.customer_id=a.customer_id
)
-- update 超过2个值
update customers a
set (city_name,customer_type)=(select b.city_name,b.customer_type
from tmp_cust_city b
where b.customer_id=a.customer_id)
where exists (select 1
from tmp_cust_city b
where b.customer_id=a.customer_id
)
========================
select * from path p,sd_mapnodes a
where p.aendnode=a.nm_node_id
update path p
set p.aendnode=(select s.ems_node_id from sd_mapnodes s where s.nm_node_id=p.aendnode)
where exists (select 1 from sd_mapnodes s where s.nm_node_id=p.aendnode)
select * from pathtrace pt,sd_mapnodes a
where pt.anode_id=a.nm_node_id
update pathtrace r
set (r.anode_id,r.znode_id)=(select s.ems_node_id,s.ems_node_id from sd_mapnodes s where s.nm_node_id=r.anode_id)
where exists (select 1 from sd_mapnodes s where s.nm_node_id=r.anode_id)