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:   2004-11-14 21:40:07
From:   Question&answer
Response to: how do we find nth highest in SQL

To find the nth highest salary as below


select max(a.sal) from emp a where &n=(select count(b.sal) from emp b where (a.sal output-
put the value of n and get the highest salary that u have give the number i;e 4,5,6,10 etc.


thanx,
Haribrat



1 to 2 of 2
  1. how do we find nth highest in SQL
    2004-12-11 08:17:00  RuchirAwadhawal [View]

  2. how do we find nth highest in SQL
    2004-12-11 08:16:41  RuchirAwadhawal [View]

1 to 2 of 2