Wednesday, 30 October 2013

How to find Third or Nth Maximum salary from salary table?

SELECT SALARY
FROM
(SELECT DISTINCT SALARY FROM EMP ORDER BY SALARY DESC)
WHERE ROWNUM <=5;

No comments:

Post a Comment