MERGEINTO table1 t1 USING ( -- For more complicated queries you can use WITH clause here SELECT*FROM table2 ) t2 ON (t1.id = t2.id) WHEN MATCHED THEN UPDATE SET t1.name = t2.name, t1.description = t2.description;
BEGIN FOR i in (select id, name, description from table2) LOOP UPDATE table1 SET name = i.name, description = i.description WHERE id = i.id; END LOOP; END;