Re: How to identify a column in order by clause
From: DA Morgan <damorgan_at_x.washington.edu>
Date: Fri, 07 Jan 2005 10:39:42 -0800
Message-ID: <41ded63f$1_2_at_127.0.0.1>
>>Mikito Harakiri wrote:
>>
>>>The positional notation is misborn ANSI SQL invention. Why is that
>>>
>>>select table_name, column_name AS COLNAME
>>>from user_tab_columns
>>>where table_name = 'SERVERS'
>>>ORDER BY 2
>>>
>>>is different from
>>>
>>>select table_name, column_name AS COLNAME
>>>from user_tab_columns
>>>where table_name = 'SERVERS'
>>>ORDER BY 1+1
>>
>>1. The first makes sense
Date: Fri, 07 Jan 2005 10:39:42 -0800
Message-ID: <41ded63f$1_2_at_127.0.0.1>
Mikito Harakiri wrote:
> "DA Morgan" <damorgan_at_x.washington.edu> wrote in message > news:41debf85$1_1_at_127.0.0.1... >
>>Mikito Harakiri wrote:
>>
>>>The positional notation is misborn ANSI SQL invention. Why is that
>>>
>>>select table_name, column_name AS COLNAME
>>>from user_tab_columns
>>>where table_name = 'SERVERS'
>>>ORDER BY 2
>>>
>>>is different from
>>>
>>>select table_name, column_name AS COLNAME
>>>from user_tab_columns
>>>where table_name = 'SERVERS'
>>>ORDER BY 1+1
>>
>>1. The first makes sense
> > > What is so special about "order by" clause to warrant positional notation? > Why positional notation isn't used anywhere else?
I didn't create the language or the vendor implementation so why ask me?
> The theory (the Alice book) says that positional and named perspective are > equivalent. One or the other can be used. However, the hypothetical use of > positional notation is severely handicapped in SQL since arbitrary > expressions involving integer scalars should be distingushed from columns.
I am not commenting about SQL as a language: Rather Oracle's implementation.
>>2. The first doesn't require use of a math routine to perform the addition
>
> You sound like math challenged folks here.
You sound like you have a bit too much testosterone and are looking for an argument: Look elsewhere.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Fri Jan 07 2005 - 19:39:42 CET