2nd highest Salary in SQL
Find 2nd Highest Salary and Nth Salary in SQL
select name, MAX(salary) as salary from Employee where salary < (select MAX(salary) from employee);
<!-- Nth row query -->
SELECT * FROM (
SELECT e.*,
ROW_NUMBER() OVER (ORDER BY salary DESC) as rn
FROM Employee e
)
WHERE rn = N;