Home Forums SQL Server 2008 SQL Server 2008 - General UPDATE table1 with table2 data RE: UPDATE table1 with table2 data
jerry-621596
SSCertifiable
Points: 6096
More actions
March 29, 2011 at 10:02 am
#1304995
Could also be:
UPDATE t1
SET t1.[field2] = t2.[field2]
FROM [table1] t1
INNER JOIN [table2] t2 NO t1.[field1] = t2[field1]
Eliminates the subquery. Should be more efficient on large datasets.