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: SELECT

Re: SELECT

From: Himansu <m.himansu_at_sify.com>
Date: 22 Sep 2001 04:42:30 -0700
Message-ID: <33194ce2.0109220342.4f65bb6a@posting.google.com>


"Uli Herberg" <ulrich.herberg_at_lrz.tu-muenchen.de> wrote in message news:<9oevqu$qvu$1_at_wsc10.lrz-muenchen.de>...
> I am new to Oracle, I only have some exprerience in MySQL. In MySQL there is
> a SELECT statement used to limit the number of rows:
> SELECT * FROM tablename LIMIT 0,10;
> (this would show the first ten entries)
>
> How can I do this in Oracle7 ?
>
> Thanks a lot
> Uli

Hi Uli !
In Oracle you have got a rownum for each row the select stmt fetches. So you can restrict the no of rows by writting: SELECT * FROM tablename where rownum <= 10;

This will do it.
Himansu
Bhubaneswar Received on Sat Sep 22 2001 - 06:42:30 CDT

Original text of this message

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