| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: And the correct answer is?
Originally posted by sandijs
> 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
>
>
I think Mikito meant that "1" OUGHT to be treated as a constant in the ORDER BY clause rather than IS, i.e. was criticising the functionality - but he didn't make that clear, and gave the impression he meant it would not work rather than should not.
-- Posted via http://dbforums.comReceived on Fri Apr 04 2003 - 06:12:06 CST
![]() |
![]() |