Subject Re: SQL Expressions
Author dianeb77@hotmail.com
--- In IB-Architect@y..., "David Schnepper" <dschnepper@b...> wrote:
>
> Last time I checked,
>
> select <expression>
> group by <expression>
> order by <expression>
>
> wasn't legal SQL by the ANSI/ISO definition. Even if the expression
> is labeled with a column alias.

ANSI/ISO SQL92 says:

select <expression> [[AS] alias] is valid
group by <expression> is not valid
group by alias is not valid
order by <expression> is not valid
order by alias is valid

I think there might have been some changes to these rules in SQL99,
but I'll have to check and post later ...

> That said, it is an incredibily useful thing to have. And I'm not
> surprised so many other databases have added it.

Ditto,
db