update table1 t1 set t1.field1 = 999 where exists ( select 1 from table2 t2 where t1.id = t2.id )