Re: first n rows...

From: dias <ydias_at_hotmail.com>
Date: 23 Nov 2001 00:53:18 -0800
Message-ID: <55a68b47.0111230053.696045d_at_posting.google.com>


Hi,

I used this trick to get the first rows ordered. It works on an Oracle 8.1.6 database:

my_table (id number, name varchar2(30));

I want the first 10 rows ordered by name:

select id, name
from my_table A, dual B
where A.name = B.dummy(+)
and rownum < 11
order by name;

Let us know if it works for you.

Dias Received on Fri Nov 23 2001 - 09:53:18 CET

Original text of this message