2nd highest salary in mysql
snippet in sql

2nd highest salary in mysql

user6358

#2nd Most highest salary using Limit & Order By
SELECT Salary FROM (SELECT Salary FROM Employee ORDER BY salary DESC LIMIT 2) AS Emp ORDER BY salary LIMIT 1;

second height salary mysql

user3501

Both options you find max as a subset and then exclude from main select
sql> SELECT MAX( col ) FROM table
 	WHERE col < ( SELECT MAX( col ) FROM table);
sql> SELECT MAX(col) FROM table 
WHERE col NOT IN (SELECT MAX(col) FROM table);

2nd highest salary in mysql

user1139

#Corelated Subquery
SELECT Id, Salary
FROM Employee e
WHERE 2=(SELECT COUNT(DISTINCT Salary) FROM Employee p
WHERE e.Salary<=p.Salary)