To find out the nth highest salary from employee table :
SYNTAX:
OR
To Find the 2nd Highest Salary in following ways
SYNTAX:
SELECT * from employee emp WHERE (n) = (SELECT COUNT(emp2.salary) FROM employee emp2 WHERE emp2.salary >= emp.salary)where n is the number of salary which you want.
OR
To Find the 2nd Highest Salary in following ways
SELECT name, salary FROM employee where salary NOT IN (SELECT MAX(salary) from employee)
SELECT MAX(salary) FROM employee where salary NOT IN (SELECT MAX(salary) from employee)