Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Newbie-Limiting rows returned in query
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
![]() |
![]() |