I found the answer.
UPDATE T1
SET Name= T2.Name
FROM Table1 AS T1
INNER JOIN
Table2 AS T
ON T1.ID = T2.ID and T1.Name<> T2.Name
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have two tables:
I want to update Table1 with Table2 data based on ID
I found the answer.
UPDATE T1
SET Name= T2.Name
FROM Table1 AS T1
INNER JOIN
Table2 AS T
ON T1.ID = T2.ID and T1.Name<> T2.Name
Then do it; where is the problem?
UPDATE T1
SET Column = T2.OtherColumn
FROM Table1 AS T1
INNER JOIN
Table2 AS T
ON T1.ID = T2.ID