Print Page | Close Window

SQL Query to get second highest salary-FAQ

Printed From: One Stop Testing
Category: Software Testing @ OneStopTesting
Forum Name: Beginners @ OneStopTesting
Forum Discription: New to the Club...!!! Don't Worry, We are here for you...!!! Learn the very basics of Software Testing and other pertinent Informations.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=6318
Printed Date: 22Jul2024 at 1:48am


Topic: SQL Query to get second highest salary-FAQ
Posted By: snigdha_123
Subject: SQL Query to get second highest salary-FAQ
Date Posted: 30Jan2009 at 12:00pm
SQL Query to get second highest salary-Frequently Asked Question in interviews
 
http://sqlqueriescollection.blogspot.com/2009/01/sql-query-to-retrieve-nth-highest.html - http://sqlqueriescollection.blogspot.com/2009/01/sql-query-to-retrieve-nth-highest.html
 
 


-------------
http://www.funandknowledge.blogspot.com -
http://www.funandknowledge.blogspot.com

http://www.sqlqueriescollection.blogspot.com - http://www.sqlqueriescollection.blogspot.com



Replies:
Posted By: nidhinav
Date Posted: 05Feb2009 at 2:44am
Select salary from salary ORDER BY salary DESC LIMIT 1,1


Posted By: skumar75.qa
Date Posted: 21Sep2009 at 12:51am

Query for second highest Salary:

select max(salary) from Employee where salary >(select max(Salary) from employee;
 


Posted By: skumar75.qa
Date Posted: 21Sep2009 at 12:52am

Query for second highest Salary:

select max(salary) from Employee where salary < (select max(Salary) from employee order by salary
 



Print Page | Close Window