Skip to content

Second highest salary in MYSQL?

MY SQL

We have one tables tblSalary

empID     empName   empSal
1              A                 5000
2              B                 3000
3              C                 2000
4              D                 6000

Using of limit option we can find second highest salary in mysql.

select empSal from tblSalary order by empSal DESC Limit 1, 1

Output

5000