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: Newbie-Limiting rows returned in query

Re: Newbie-Limiting rows returned in query

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sat, 18 Dec 1999 09:25:34 -0500
Message-ID: <u86n5skvaksfqv2dlatkigj8l8jia3492c@4ax.com>


A copy of this was sent to John Shaft <shaft_at_meanmutha.com> (if that email address didn't require changing) On Fri, 17 Dec 1999 21:11:36 -0600, you wrote:

>Does Oracke offer some way to liit the rows returned in a query? For
>instance say I want so select all the rows in a table sorted by name, but
>I only want the first ten names. Can I limit to rows 1-10?
>
>Thanks!
>
>shaft_at_meanmutha.com
>http://www.meanmutha.com

In Oracle8i, release 8.1 you can code:

select *
  from ( select * from T order by name )  where rownum <= 10
/

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Sat Dec 18 1999 - 08:25:34 CST

Original text of this message

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