Table 1:
id name desc ----------------------- 1 a abc 2 b def 3 c adf
Table 2:
id na
BEGIN For i in (select id, name, desc from table2) LOOP Update table1 set name = i.name, desc = i.desc where id = i.id and (name is null or desc is null); END LOOP; END;