SQL*PLUS CHALLANGE

From: Roya Mehrfar <roya_mehrfar_at_qmbridge.calstate.edu>
Date: 1996/09/26
Message-ID: <324A4590.2396_at_qmbridge.calstate.edu>#1/1


I have a sqlplus statement with an order by that I need to retrieve only the first 25 rows. I tried where rownum < 26 but it trows away my order by because I would like to do the order by first and then get the first 25 rows.My statement looks like:

select name, address
from emp
where city='LA'
order by name;

If I add rownum<26 it gets the first 25 and then orders by name, but I want to order by first.

I thought of maybe adding 'minus' clause, but that didn't work either.

Thanks for any help Received on Thu Sep 26 1996 - 00:00:00 CEST

Original text of this message