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

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL problem

Re: SQL problem

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 29 Jun 2001 12:50:52 -0700
Message-ID: <9him6s01cii@drn.newsguy.com>

In article <3B3CB6C4.E352DE3B_at_attws.com>, "Daniel says...
>
>Rok Kodrun wrote:
>

...

>My understanding is that no version of Oracle has ever allowed an ORDER BY
>clause in a view. The reason being that the ORDER BY belongs in the statement
>selecting from the view.
>
>But having recently made two grevious mistakes here I wanted to be conservative
>in my comment.
>
>Daniel A. Morgan
>

added in Oracle8i release 1:

scott_at_TKYTE816> select * from( select ename, sal from emp order by sal desc ) where rownum < 4;

ENAME SAL
---------- ----------

KING             5000
SCOTT            3000
FORD             3000

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle Corp Received on Fri Jun 29 2001 - 14:50:52 CDT

Original text of this message

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