Infosys Interview Question

write SQL query to get the Sixth minimum salary

Interview Answers

Anonymous

Apr 12, 2019

select * from employees where rownum=6 order by salary

Anonymous

Jan 10, 2025

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