update s set s.thisField = d.thatField, s.anotherField = d.andAnotherField from Table1 s, Table2 d where s.id = d.table1Id
Thursday, 23 December 2010
Updating fields in one table with fields in another
Subscribe to:
Posts (Atom)
ASP.NET, C#, jQuery, JavaScript, AJAX, SQL, LINQ, CSS, Ruby, Rails, HTML, iPhone, iOS, apps. Freelance programmer, developer, engineer for web and mobile in Bristol, UK.
update s set s.thisField = d.thatField, s.anotherField = d.andAnotherField from Table1 s, Table2 d where s.id = d.table1Id