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: Can I ask for a ROW

Re: Can I ask for a ROW

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Tue, 09 Jul 2002 13:27:55 GMT
Message-ID: <vxBW8.460622$cQ3.38117@sccrnsc01>


I think you need to understand that there is no 5th row of a table. There is a 5th row of a particular result set and that is what Andy is indicating in his example. What do I mean by there is no 5th row of a table? Tables are just data stored in a heap or without order. So to ask for the 5th row of a table is meaningless since the 5th row could be any row. (I am ignoring IOTs and other schemes to store the table data in an order) It is meaning ful to say I have a result set that is ordered in this manner and I only want the 5th row of that. In that case Andy's example is the one to use.
Jim
"Oscar" <oscar_ll_at_jofre.com> wrote in message news:ageckj$90c$1_at_nsnmrro2-gest.nuria.telefonica-data.net...
> It's a really good solution but witch is the order i get from the table...
> because i can't do:
> > select *
> > from
> > (
> > select t.*, rownum as r
> > from t
> > where rownum <= 5 ORDER BY MyRow
> > )
> > where r = 5;
>
> "Andy Triggs" <andrew.triggs_at_businessobjects.com> escribió en el mensaje
> news:2b6e86d0.0207050240.14637c3d_at_posting.google.com...
> > How about this?
> >
> > select *
> > from
> > (
> > select t.*, rownum as r
> > from t
> > where rownum <= 5
> > )
> > where r = 5;
> >
> > Regards, Andy
> >
> > "Oscar" <oscar_ll_at_jofre.com> wrote in message
> news:<ag3fn1$jog$1_at_nsnmrro2-gest.nuria.telefonica-data.net>...
> > > Can I make any select for ask for a row pos I mean if I can do any
> select
> > > direct for get the 5th row ? Without any col tha has rownumber ?
> > >
> > > Thanks.
>
>
Received on Tue Jul 09 2002 - 08:27:55 CDT

Original text of this message

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