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

Home -> Community -> Usenet -> c.d.o.misc -> Unexpected result from simple query

Unexpected result from simple query

From: Can <no_at_spam.net>
Date: Thu, 11 Dec 2003 23:31:54 GMT
Message-ID: <K77Cb.8493$dt3.380@news.chello.at>


Hi,

To my astonishment, the following query doesn't limit the resultset as desired:

SELECT columnA, columnB, RN
FROM (

          SELECT columnA, columnB, ROWNUM RN
          FROM mytable
            )

WHERE RN BETWEEN 4 AND 12; If I'm not completely mistaken this used to work. It should return me no more than 13 rows. But unfortunately I get all the rows from the table. Could it be that some optimizer hint is responsible for this behaviour (which I dont't assume)?
Or could the analyzation of the table have turned the query disfunctional? I don't have any idea as to why the query returns keeps returning all rows...

Thanks for comments...

Can Received on Thu Dec 11 2003 - 17:31:54 CST

Original text of this message

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