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 -> Re: Unexpected result from simple query

Re: Unexpected result from simple query

From: Ryan Gaffuri <rgaffuri_at_cox.net>
Date: 12 Dec 2003 10:50:02 -0800
Message-ID: <1efdad5b.0312121050.3bc9f66c@posting.google.com>


"Can" <no_at_spam.net> wrote in message news:<K77Cb.8493$dt3.380_at_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

go to asktom.oracle.com. he uses too levels of inline views. do a search for m through n query or something like that. Received on Fri Dec 12 2003 - 12:50:02 CST

Original text of this message

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