Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> rownum
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
![]() |
![]() |