Click here to Skip to main content
14,934,114 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
can anyone help me with this query!
write a query to find 2nd highest paid salary from the table customer?
Posted
Comments
AmitGajjar 6-Sep-13 6:30am
   
you can easily find that by searching in google...
AmitGajjar 6-Sep-13 6:30am
   
BTW, why you are not doing your homework yourself ?

SQL
select MAX(Salary) from Employees
WHERE Salary <> (select MAX(Salary) from Employees) -- works with any version

Select * From Employees -- For Sql Server 2012 only...
Order by Salary Desc
Offset 1 Rows
Fetch Next 1 Rows only;

Nth Highest Salary
   
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900