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

Home -> Community -> Usenet -> c.d.o.server -> Re: Stupid SQL question

Re: Stupid SQL question

From: Phung Hoang-Vu <hoang-vu_at_freesurf.ch>
Date: Sun, 12 Dec 1999 03:37:04 +0100
Message-ID: <38530A50.A0F3434@freesurf.ch>


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

Original text of this message

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