update
table1 t1
set
(
t1.column1,
t1.column2
) = (
select
t2.column1,
t2.column2
from
table2 t2
where
t2.column1 = t1.column1
)
where exists (
select
null
from
table2 t2
where
t2.column1 = t1.column1
);
Of dit (als t2.column1 <=> t1.column1 veel op één is en iedereen goed is):
update
table1 t1
set
(
t1.column1,
t1.column2
) = (
select
t2.column1,
t2.column2
from
table2 t2
where
t2.column1 = t1.column1
and
rownum = 1
)
where exists (
select
null
from
table2 t2
where
t2.column1 = t1.column1
);