Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to limit the number of rows returned in a select statement
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.htmReceived on Thu Jun 05 1997 - 00:00:00 CDT
![]() |
![]() |