Home » RDBMS Server » Server Administration » Re: finding nth max of column in a table
Re: finding nth max of column in a table [message #372107] Wed, 10 January 2001 08:37
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
Hi,
Try this
select eno,sal from emp a
where &nthmaxsal= (select count(distinct(sal)) from emp b where a.sal<=b.sal )

in this case, nthmaxsal=20

[b]Suresh Vemulapalli[b]
Previous Topic: display "NULL" for null value ?
Next Topic: Regarding Storage Of Images Into Database
Goto Forum:
  


Current Time: Sun May 19 02:50:39 CDT 2024