Hi All,
I want to update multiple columns from multiple tables in a single UPDATE Query...
Just want to do like below query...
UPDATE Table1, Table2
SET Table1.Column1 = 'one'
,Table2.Column2 = 'two'
FROM Table1 T1, Table2 T2
WHERE T1.id = T2.id
and T1.id = 'id1'
Does Sql Server 2008 provide any mechanism to do so?
If Sql Server 2008 provide such nice approach, please share some links with me!
Thanks!
How to update multiple tables in sql server 2008 ?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

venkata kumarRank #5,034 · 314 reputationPosted Mar 9, 2013, 12:16 AM EST
you can use stored procedure
by using that at a time you can execute one or more tables can upate
Mohamed Gani MnRank #3,253 · 440 reputationPosted Oct 10, 2015, 5:45 PM EDT
BEGIN TRANSACTION UPDATE Table1 SET Table1.Column1 = 'name' FROM Table1 T1, Table2 T2 WHERE T1.id = T2.id and T1.id = '100' UPDATE Table2 SET Table2.EntityName = 'watch' FROM Table1 T1, Table2 T2 WHERE T1.id = T2.id and T1.id = '100' COMMIT