update a
set a.cod = (select b.cod
from b
where b.id = a.id)
where /*eventuali condizioni su a*/


fammi sapere se va...
Ciao