Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Stupid SQL question
The order that the rows are returned is still arbitrary. You can't
predict that you will get the first n rows inserted into the table. The
rownum pseudocolumn is applied BEFORE sorting so you can't even
guarantee that you'll get the top n from an ordered list. PQO further
muddies the water as multiple parallel query servers can return the rows
"interleaved".
The best you can do is abort the query after n rows.
D.
ocx wrote:
>
> not true, using where rownum <11 will do.
>
> _____________________
> Nobody
>
> Kenneth C Stahl <BlueSax_at_Unforgettable.com> wrote in message
> news:3848447F.81611C2A_at_Unforgettable.com...
> > Laurent TRESCAZES wrote:
> > >
> > > Hi eveybody,
> > >
> > > Does someone knows how to write a SQL sentence that return for example
> > > the first 10 records of table that includes many records
> > >
> > > I try to remember my SQL class but it's far away #8-)
> > >
> > > Best regards
> > >
> > > Laurent
> >
> > In the SQL world there is no such concept as the "first 10 records" in a
> > table. That is old flat file or dbase thinking. The only concept that is
> > remotely relevant is processing the first 10 records that are returned by
> a
> > specific cursor.
> >
> >
Received on Mon Dec 06 1999 - 21:43:02 CST
![]() |
![]() |