----------------------------------------------
The contents of this post are my opinions only
      If swallowed seek medical advice 

> -----Original Message-----
> From: Muqthar Ahmed [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 22 October 2003 06:44
> To: Multiple recipients of list ORACLE-L
> Subject: How To Pull Second Row from 100 ROWS
> 
> 
> Hi,
> 
> Is there a way to pull ONLY 2nd row from the selected rows.
> 
> Thanks
> Muqthar Ahmed
> DBA

Others have shown the proprietary Oracle way.  Assuming your instance has the 
necessary plumbing, you can use the OLAP approach ... which also happens to transport 
to other RDBMS.

SELECT a.blah, a.blahblah ...
FROM
  ( SELECT
      ROW_NUMBER() OVER (blah) AS row_number, blah, blahblah
    FROM <your table>
    [where ...]
  ) a
WHERE a.row_number =2;

Enjoy!

Ciao
Fuzzy
:-)
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Grant Allen
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to