ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  SQL Data Types
Subject:   how do we find nth highest in SQL
Date:   2005-10-17 23:31:59
From:   Apurva_Sharma
Response to: how do we find nth highest in SQL

Hi,
Solution to your query.Plz follow steps.


Steps
SQL> SET Verify OFF;


SQL> SELECT min(sal)
FROM (SELECT sal
FROM emp
order by sal desc)
WHERE rownum<(&nth_heighest+1);