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

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!