Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Problem with SQL-Statement
<devnull50_at_yahoo.com> schrieb in im Newsbeitrag:
9cu45a$dle$1_at_news.netmar.com...
> Oracle's handbook is correct. Why not form the statement like...
>
> select * from xyz where rownum < 10 order by ident_column;
>
> This should give you the same result.
>
Normally not (except the table has only 9 records)! You retrieve the first 9 rows of the [unsorted] table and sort them by the value of ident_column. But the desired result were the 9 rows with the highest/lowest value of ident_column (described as TOP-n query in the Oracle 8i manual) -> sort all records by ident_column and retrieve the first 9 records from the sorted records.
Klaus Received on Fri May 04 2001 - 08:39:30 CDT
![]() |
![]() |