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 -> Use rownum only if the select is not ordered

Use rownum only if the select is not ordered

From: John Harris <jharri_at_sapient.com>
Date: Wed, 6 Jan 1999 20:15:52 -0500
Message-ID: <0685A427A719D11197BB00A024D399450BBB45BA@delphi.sapient.com>


If your original select statement contains an order by clause then using rownum may give you unusual results since the rownum condition is applied before the order by. Oracle will select 10 records then order them. If there is no requirement to order the rows you can use rownum.

-----Original Message-----
From: G. Kakisina [mailto:ivkaki_at_hvision.nl] Posted At: Tuesday, January 05, 1999 2:44 AM Posted To: server
Conversation: Restrict the number of records Subject: Restrict the number of records

Hi,

I want to know if it is possible to restrict the number of records to show
when using a SELECT statement.
For example, i got a table with a thousand records. When I use a SELECT statement, 500 records show up. I only want 10 results. How can i do this?

G. K. Received on Wed Jan 06 1999 - 19:15:52 CST

Original text of this message

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