Second highest salary using SQL Share
In this tutorial, we are going to teach you, how to find Second highest salary using SQL.
For Example: You have a salary table and you have five users records in salary table and you need to find second highest salary in this table.
Demo Table:
Sql Query:
SELECT MAX(emp_salary)
FROM `salary`
WHERE emp_salary
NOT IN (SELECT MAX(emp_salary) FROM salary);
Result:





Click to Join








Comments 0