update customer1 a set (a.name1,a.name2)=(select b.name1 ,b.name2 from customer2 b where a.id1=b.id1 and a.id2=b.id2 )
update customer1 a set (name1,name2)=(select name1,name2 from customer2 b where a.id1=b.id1 and a.id2=b.id2)
我觉得where里面两表的顺序应该倒过来更好些update customer1 a set (name1,name2)=(select name1,name2 from customer2 b where id1=a.id1 and id2=a.id2)
update customer1 a set (name1,name2)=(select name1,name2 from customer2 b where a.id1=b.id1 and a.id2=b.id2) where exists(select 1 from customer2 b where a.id1=b.id1 and a.id2=b.id2)
set (a.name1,a.name2)=(select b.name1 ,b.name2 from customer2 b
where a.id1=b.id1
and a.id2=b.id2 )
set (name1,name2)=(select name1,name2 from customer2 b where a.id1=b.id1
and a.id2=b.id2)
set (name1,name2)=(select name1,name2 from customer2 b where id1=a.id1
and id2=a.id2)
set (name1,name2)=(select name1,name2 from customer2 b where a.id1=b.id1
and a.id2=b.id2) where exists(select 1 from customer2 b where a.id1=b.id1
and a.id2=b.id2)