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

Home -> Community -> Usenet -> c.d.o.tools -> Re: easy question

Re: easy question

From: Dan <djb0x7736d657_at_scream.org>
Date: 26 Aug 2000 05:44:16 GMT
Message-ID: <slrn8qemom.ach.djb0x7736d657@v2000.scream.org>

Marshall Mednick <marshall.mednick_at_utoronto.ca> wrote:
> Hi there,
>
> I would like to select only the top 5 rows of a select statement, however
> using the keyword TOP doesn't seem to work. What might the syntax be for an
> oracle 8.0.4 database?
> I've tried SELECT TOP 5 Grading from Grading;

I am not a DBA, and we've got 8.1.6.1.0, but we used to have 8.0.6 and I don't recall that functionality changing. I think you're after the ROWNUM parameter, e.g.:

  SELECT COLUMN FROM TABLE WHERE ROWNUM < '6';

Hope that helps,

-Dan

-- 
Dan Birchall - Palolo Valley, Honolulu HI - http://dan.scream.org
Post your reviews; get paid: http://epinions.scream.org/join.html
Free web-based e-mail: http://www.themail.com/ref.htm?ref=1163079
My address expires - take out the hex stamp if your reply bounces
Received on Sat Aug 26 2000 - 00:44:16 CDT

Original text of this message

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