Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Using order by with union

Re: Using order by with union

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Thu, 14 Oct 1999 21:33:23 GMT
Message-ID: <386d4bee.173849429@netnews.worldnet.att.net>


On Thu, 14 Oct 1999 16:53:35 GMT, Chris Seline <seline_at_2wrongs.com> wrote:

>the same query using num instead of -num works fine, but I just need it
>to come out in the
>reverse order

Use:

...
order by num desc;

The "desc" keyword sorts descending.

The reason the column must be in the select list is that conceptually, Oracle pulls the selected columns out of the tables, and by the time the sort happens, only the selected columns are available.

Jonathan



jonathan_at_gennick.com
http://gennick.com
Brighten the Corner Where You Are Received on Thu Oct 14 1999 - 16:33:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US