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 -> rownum

rownum

From: Chaz <chaz_at_hates.spam>
Date: Mon, 5 Feb 2001 20:19:51 -0800
Message-ID: <3a7f7a4b@newsserver1.intergate.ca>

can anyone help me find a way to limit the number of records returned in a select statement? here's what i mean:

in MS SQL Server, the "TOP n" kewords (as in "SELECT TOP 10 fname FROM table") specify how many records *out of the resultset generated from the rest of the select statement* are actually returned. in Oracle, the closest thing I've found is "WHERE rownum <= n". But this rownum is an internal index, so it doesn't limit the resultset to the top n of that resultset, but to records whose rownum is <= n. Theres a huge difference here, and I'm totally stumped.

is there a similar keyword in Oracle?
do i have to spend the next week writing a stored proc to achieve this? any clues?

thx in advance. Received on Mon Feb 05 2001 - 22:19:51 CST

Original text of this message

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