Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Stupid SQL question
If you use Oracle, you can do select * from A where rownum < 11 for
example.
It is not standard SQL . Otherwise add a column named order
then do select * from A where order <= 10.
If you can't modify your table then create a temporary table, with
the added column then do the above instruction.
Hope that helps.
Kenneth C Stahl wrote:
>
> 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 Sat Dec 11 1999 - 20:37:04 CST