Interview QuestionsCategory: MySQLHow to find third highest salary in mysql?
bestonetechnologies Staff asked 1 year ago

How to find third highest salary in mysql?

1 Answers
bestonetechnologies Staff answered 1 year ago

SELECT DISTINCT salary FROM EMP ORDER BY salary DESC LIMIT 2 , 1
OR
select max(salary) from emp where salary < (select max(salary) from emp where salary < (select max(salary) from emp))