|Subject:||how do we find nth highest in SQL|
Response to: how do we find nth highest in SQL
SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal);
Enter value for n: 2
Showing messages 1 through 1 of 1.
how do we find nth highest in SQL
2010-03-06 20:24:30 Sikindar [View]