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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to limit the number of rows returned in a select statement

Re: How to limit the number of rows returned in a select statement

From: Stephen A. Rodgers <trodgers_at_prominenceconsulting.com>
Date: 1997/06/05
Message-ID: <33964166.95AE6143@prominenceconsulting.com>#1/1

The easiest way I've seen to do this in the past is to create a view which has your select statement and where clause, and include your count of records based on rownum.

Next, simply do a select from the view and add your ORDER BY clause to that. The order by happens after rows are returned from the view, so it will not harm the sequence of the rownumbers being returned.

Good luck!

-- 
Stephen A. Rodgers
Prominence Consulting, Inc.

http://www.icca.org/firms/f15498.htm
Received on Thu Jun 05 1997 - 00:00:00 CDT

Original text of this message

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