queries [message #374416] |
Mon, 11 June 2001 05:43 |
Raj
Messages: 411 Registered: November 1998
|
Senior Member |
|
|
query
for second maximum salary in employee table
or nth maximum salary in employee table
|
|
|
Re: queries [message #374480 is a reply to message #374416] |
Thu, 14 June 2001 04:59 |
Thirumalai and Prakash
Messages: 23 Registered: March 2001
|
Junior Member |
|
|
Hi Raj,
The query to find nth maximum is
select min(f) from (select distinct f from tbl order by f desc ) where rownum < &n + 1
Where, f is field and tbl is table name.
Regards
S.Thirumalai
|
|
|
Re: queries [message #374481 is a reply to message #374416] |
Thu, 14 June 2001 05:02 |
Thirumalai and Prakash
Messages: 23 Registered: March 2001
|
Junior Member |
|
|
Hi Raj,
The query to find nth maximum is
select min(f) from (select distinct f from tbl order by f desc ) where rownum < &n + 1
Where, f is field and tbl is table name.
Regards
S.Thirumalai
|
|
|