I recall back in the SQL Server 2000 days, this was considered bad and inefficient coding. Does it still hold true:
UPDATE b
SET b.something = a.something
FROM table1 a
INNER JOIN table2 b
ON a.key = b.key
The issue is that the UPDATE statement is updating table2 but table1 is in the FROM clause, and it could cause issues with performance and should be written:
UPDATE b
SET b.something = a.something
FROM table2 b
INNER JOIN table1 a
ON a.key = b.key
Could there be performance issues in newer versions (e.g. 2012 and up) with this syntax? If so, can someone explain how the inefficiencies show themselves? I've looked as some query plans going both ways and they seem identical.
Longer answer, it depends a lot on how things are indexed. The first approach should work fine but you're updating across the join which tends to slow things down a bit. Plug both of those into SSMS and determine the execution plan for each. It's entirely possible that the current SQL optimizer routines can properly optimize both queries just as efficiently. I'm tempted to believe, however, that the 2nd update statement will somehow be more efficient.