How to find second highest salary of employee in mysql

In this article, We’ll see how to find Second Highest Salary of Employee




We’ve created a employees table i.e tbl_employees and added some records inside table.

employees table

Query to find Second Highest Salary of Employee

SELECT MAX(salary) as second_highest_salary FROM `tbl_employees` WHERE salary < (SELECT MAX(salary) FROM `tbl_employees`)

employees table

That’s it!. Please share your thoughts or suggestions in the comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *