Mark same columns in JOIN conditions
It helps avoiding join on the same column (especially at inner join).
Example:
UPDATE A SET Column1 = B.Column2 FROM TableA AS A INNER JOIN Table B ON A.Column3 = A.Column3.
It happens usually by accident. The statement should be:
UPDATE A SET Column1 = B.Column2 FROM TableA AS A INNER JOIN Table B ON A.Column3 = B.Column3.
14
votes
Tamas Kaposztas
shared this idea