Skip to content

Instantly share code, notes, and snippets.

@halityurttas
Created September 16, 2015 13:15
Show Gist options
  • Save halityurttas/e19fbd69d38730ca77e2 to your computer and use it in GitHub Desktop.
Save halityurttas/e19fbd69d38730ca77e2 to your computer and use it in GitHub Desktop.
Update table with join
UPDATE t1
SET t1.CalculatedColumn = t2.[Calculated Column]
FROM dbo.Table1 AS t1
INNER JOIN dbo.Table2 AS t2
ON t1.CommonField = t2.[Common Field]
WHERE t1.BatchNo = '110';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment