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

advertisement

AddThis Social Bookmark Button
Subject:   how do we find nth highest in SQL
Date:   2005-10-30 09:21:35
From:   bhaskarreddy
Response to: how do we find nth highest in SQL

select * from emp e where 1=(select count(distinct sal) from emp where e.sal<=sal)
if u want to print the second highest sal. replace 1 with 2.

1 to 1 of 1
  1. how do we find nth highest in SQL
    2006-10-17 02:09:39  Asha_S [View]

    • how do we find nth highest in SQL
      2010-05-11 00:05:08  vish44 [View]

1 to 1 of 1