Steve Howard wrote:
>
> > UPDATE Table1
> > Set Column1 = r.Column1, Column2 = r.Column2
> > FROM Table1 l INNER JOIN Table2 r ON l.Column3 = r.Column3
>
> That is the ANSI SQL standard.
Could I ask where you find that information? (That's not a rhetorical
question). My sources say that subqueries are allowed for individual
values in the set clause list, but I see no mention of a from clause
that applies to the whole update.
SQL92:
<update statement: searched> ::=
UPDATE <table name>
SET <set clause list>
[ WHERE <search condition> ]
SQL3:
<update statement: searched> ::=
UPDATE <table reference>
<update mechanism>
SET [ <update type> ] <set clause list>
[ WHERE <search condition> ]
Sources:
1. (Second Informal Review Draft) ISO/IEC 9075:1992, Database Language
SQL- July 30, 1992
2. ISO-ANSI Working Draft, Database Language SQL/Foundation (SQL3)
3. _The SQL Standard_, Fourth Edition, by C.J.Date and Hugh Darwin.
--
Jeff