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: SPOOKY SQL

Re: SPOOKY SQL

From: Arlette BROSSARD <abray_at_club-internet.fr>
Date: Sat, 22 May 1999 00:46:18 +0200
Message-ID: <7i4noj$sfm$1@front3.grolier.fr>


Be careful with ROWNUM when you use an ORDER BY clause. It doesn't work every times.

I had some problems with it, so I read in Oracle 7 RDBMS :

Oracle7 assigns a ROWNUM value to each row as it is retrieved, before rows are sorted for an ORDER BY clause, so an ORDER BY clause normally does not affect the ROWNUM of each row. However, if an ORDER BY clause causes Oracle7 to use an index to access the data, Oracle7 may retrieve the rows in a different order than without the index, so the ROWNUMs may differ than without the ORDER BY clause.

kpick_at_my-dejanews.com a écrit dans le message <7i3vec$n$1_at_nnrp1.deja.com>...
>Try adding WHERE ROWNUM < 6 and making the order by 3 decending
>
>
Received on Fri May 21 1999 - 17:46:18 CDT

Original text of this message

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