Suppose I have a simple update of one table with data from another table.
update t1
set (a,b) = (select a,b from t2 where id=17)
where id=17;
How can i apply a similar update to multiple id's in one statement? In my brain I'm thinking iteratively of something like this:
for X in (select id from t2 where ...):
update t1
set (a,b) = (select a,b from t2 where id=X)
where id=X;
Generic SQL preferred, but Oracle-specific solutions welcomed as well.