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: Finding Second Highest Number

Re: Finding Second Highest Number

From: Matthias Lippmann <DeleteThisSpamProtector.matthias_at_lippmannsoft.de>
Date: Thu, 24 Oct 2002 07:47:07 +0200
Message-ID: <MOLt9.1$Sa5.955@news.ecrc.de>

"Grant" <indie9(nospam)@hotmail.com> schrieb im Newsbeitrag news:3db7640b$0$18869$afc38c87_at_news.optusnet.com.au...
> Can anyone tell me how to find the second highest value in a column in Oracle.
>
>

This query has not been tested in Oracle, but works fine in Access:

SELECT MAX(myColumn) FROM MyTable WHERE
myColumn < (SELECT MAX(myColumn) FROM MyTable)

Best Regards

Matthias Lippmann Received on Thu Oct 24 2002 - 00:47:07 CDT

Original text of this message

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