How to find secound largest salary from sql
  • How to find secound largest salary from sql
  • 1 Comment sorted by
  • You can use sub queries for this task.I have Employee table with LastName,Salary and more as column names
    This query will get the second largest salary
    WITH TopSalary(LastName,Salary)
    AS
    (
     SELECT TOP(2) LastName,Salary
     FROM dbo.Employees
     ORDER BY Salary DESC
    )
    SELECT MIN(Salary)
    FROM TopSalary

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

Top Posters Weekly

Optimum Creative