Thursday, 23 December 2010

Updating fields in one table with fields in another

update s
set s.thisField = d.thatField, s.anotherField = d.andAnotherField
from Table1 s, Table2 d
where s.id = d.table1Id