Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Quesry question
A copy of this was sent to "Cyb3rPunk" <a.merola_at_inwind.it> (if that email address didn't require changing) On Fri, 18 May 2001 12:13:09 +0200, you wrote:
>Hiya all!
>
>I have a quesry question...
>
>On my MS SQL server I have made this query:
>
>Select TOP 10 * from <table>
>and it returns the first 10 results (in the resultset) of the query..
>
>Now I have the same DB on Oracle 8i, but the query doesn't work because it
>seems not to accept the "TOP 10" instruction.
>
>Can someone help me?
1 select *
2 from ( select ename, sal from emp order by sal desc )
3* where rownum <= 10
scott_at_ORA8I.WORLD> /
ENAME SAL
---------- ----------
KING 5000 SCOTT 3000 FORD 3000 JONES 2975 BLAKE 2850 CLARK 2450 ALLEN 1600 TURNER 1500 MILLER 1300 WARD 1250
10 rows selected.
>
>Bye
>
>Alex
>
-- Thomas Kyte (tkyte_at_us.oracle.com) Oracle Service Industries Howtos and such: http://asktom.oracle.com/ Oracle Magazine: http://www.oracle.com/oramag Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Fri May 18 2001 - 10:30:39 CDT
![]() |
![]() |