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: And the correct answer is?

Re: And the correct answer is?

From: sandijs <del_at_one.lv>
Date: Fri, 04 Apr 2003 12:00:58 +0000
Message-ID: <2729051.1049457658@dbforums.com>

You are wrong here. When you say "ORDER BY 1" it means you want to order by first column of resultset and "ORDER BY 2" = order by second column and so on.

Sandijs
OCP DBA,
Riga, Latvia

Originally posted by Mikito Harakiri
> "1" is just a constant function (or constant expression), so that
>
> SELECT empno, ename FROM emp ORDER BY 1
>
> must be equivalent to
>
> SELECT empno, ename FROM emp ORDER BY 2
>
> and to just
>
> SELECT empno, ename FROM emp

--
Posted via http://dbforums.com
Received on Fri Apr 04 2003 - 06:00:58 CST

Original text of this message

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