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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Limitting result without ROWNUM

Re: Limitting result without ROWNUM

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: 19 Jan 2007 12:59:08 -0800
Message-ID: <1169240348.932836.284140@q2g2000cwa.googlegroups.com>

Matthias Matker wrote:
> Hello together,
>
> I have to limit the number of results without using ROWNUM or something
> like that. One hint was to use "JOIN".
>
> I have to select the 10 biggest persons from a table "persons"
>
> id, firstname, lastname, size, age
>
>
> WITHOUT using ROWNUM or "limitter" like this.
>
> Do you have any idea?
>
> Thanks a lot.

Strange requirement - care to explain why? I'd suggest using RANK() or DENSE_RANK() analytic functions for this, but you might consider them "limiters", too, so... How about just fetching the first 10 rows of the result set and ignoring the rest?

Hth,

    Vladimir M. Zakharychev
    N-Networks, makers of Dynamic PSP(tm)     http://www.dynamicpsp.com Received on Fri Jan 19 2007 - 14:59:08 CST

Original text of this message

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