Search This Blog

Sunday, July 23, 2017

Select Second Height Value/ Salary from a Table

SELECT *
  FROM (SELECT e.* ,ROW_NUMBER () OVER (ORDER BY salary DESC) rn
          FROM employees e)
 WHERE rn = 2;

No comments:

Post a Comment

Error From Interactive Grid - Process ' Process- Save Interactive Grid Data' raised 'ORA-0000: normal, successful completion' while performing row locking.

Error: Process ' Process- Save Interactive Grid Data' raised 'ORA-0000: normal, successful completion' while performing row ...