Suppose I have a table employee with id, user_name, salary. How can I select the record with the 2nd highest salary in Oracle?
I googled it, find this solution, is t
You should use something like this:
SELECT * FROM (select salary2.*, rownum rnum from (select * from salary ORDER BY salary_amount DESC) salary2 where rownum <= 2 ) WHERE rnum >= 2;