Thursday, March 14, 2013

Second Largest salary

Find Second Largest salary of the employee..



SELECT *FROM Employee E1WHERE (N-1) = (SELECT COUNT(DISTINCT(E2.Salary))FROM Employee E2WHERE E2.Salary > E1.Salary)