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
select Max(Salary) as SecondHighestSalary from Employee where Salary not in (select max(Salary) from Employee)