find the Second Highest Salary of Employee in SQL

 SELECT MAX(salary) FROM employee WHERE salary NOT IN (SELECT MAX(salary) FROM employee);

======================================================================= 

                                                                    OR

=======================================================================
select salary from employee order by salary desc limit 1 offset 1 

===============================================================

Comments

Popular posts from this blog

Mr. Myers wants to edit the marks assigned to the questions

Genral Ability

Object Orinted Programing