Update statement with joins

To run an update statement with a join, you need to use an alias.


UPDATE a
SET a.Column1 = 1
FROM Table1 a
INNER JOIN Table2 b ON b.Table2Id = a.Table1Id
WHERE a.Column2 = 0

Subscribe

0 comments