update table2
set field2=1
from table1,table2
where table1.field1=table2.field1
and table1.field2=1