Infosys interview question

write SQL query to get the Sixth minimum salary

Interview Answers

Anonymous

12 Apr 2019

select * from employees where rownum=6 order by salary

Anonymous

10 Jan 2025

correct one is SELECT MIN(salary) FROM ( SELECT salary FROM employees ORDER BY salary ) WHERE ROWNUM = 6;