Barry Lind <[EMAIL PROTECTED]> writes:
> What I would expect the syntax to be is:
> table as alias (columna as aliasa, columnb as aliasb,...)
> This will allow the query to work regardless of what the table column
> order is. Generally the SQL spec has tried not to tie query behaviour
> to the table column order.
Unfortunately, the spec authors seem to have forgotten that basic design
rule when they wrote the aliasing syntax. Column alias lists are
position-sensitive:
<table reference> ::=
<table name> [ [ AS ] <correlation name>
[ <left paren> <derived column list> <right paren> ] ]
| <derived table> [ AS ] <correlation name>
[ <left paren> <derived column list> <right paren> ]
| <joined table>
<derived column list> ::= <column name list>
<column name list> ::=
<column name> [ { <comma> <column name> }... ]
SQL99 seems to be no better. Sorry.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]