Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: easy question
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 bouncesReceived on Sat Aug 26 2000 - 00:44:16 CDT