Re: Repeated columns in an ORDER BY clause?

From: Pravin Rangnekar <2clicks_at_winternet.com>
Date: 1996/05/05
Message-ID: <318D08A5.35AC_at_winternet.com>#1/1


Gautam Bhargava wrote:
>
> Is it legal to repeat column names in an ORDER BY cluase. In other words,
> is the following a legal SQL query?
>
> SELECT a, b, c FROM myTable
> ORDER BY a, b, a
>
> Sybase 10.0 flags an error on this.
> Oracle 7.2 processes it just fine.
>
> What does the "official" ANSI-standard have to say?
>
> Thanks.
>
> --
> Gautam

Gautam:

Why do you want to do this? What are trying to achieve? Second occurance of a, in the given example, will not have any effect on the order by as by then it will be already sorted in that order.

Pravin Rangnekar
Click Click, Inc.

2clicks_at_winternet.com Received on Sun May 05 1996 - 00:00:00 CEST

Original text of this message