Let’s deprecate UPDATE FROM!
59 Comments
I guess that many people using UPDATE … FROM on a daily basis do so without being aware that they are violating all SQL standards. All versions of the ANSI SQL standard that I checked agree that an UPDATE statement has three clauses – the UPDATE clause, naming the table to be updated; the SET clause, specifying the columns to change and their new values; and the optional WHERE clause to filter the rows to be updated. No FROM or JOIN – if you need data from a different table, use a subquery in the SET clause. The optional FROM…