Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a query to find second highest salary of an employee.

Answer Posted / prashant srivastava

**Exact answer to the question**

SELECT MIN(e1.Salary) FROM emp e1 WHERE e1.Salary IN
(Select e2.Salary from emp e2 ORDER BY e2.Salary DESC FETCH
FIRST 2 ROWS ONLY)

**Generic Solution**

SELECT MIN(e1.Salary) FROM emp e1 WHERE e1.Salary IN
(Select e2.Salary from emp e2 ORDER BY e2.Salary DESC FETCH
FIRST n ROWS ONLY)

Just replace n as the asked rank of the salary. For instance

If 29th highest salary is asked then replace n with 29..
simple...isn't it? :):)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi All, Is there any free automation tool for windows application and it's easy to use? I usually take a lot of time to regression test my application when there is a new build on live environments (about same 10 environments) I wish I know a automation tool to regression test and ofcourse it's free, easy to use (maybe using C#) Could anybody can advise to me a tool like that? I very appreciate ^^

1987


How to check if an element is visible on the page?

974


Does every software project need testers?

998


What is ‘good code’? What is ‘good design’?

988


What is the Differnce between Client/Server Testing and Web Based Testing?

9373


How can the user get a text of a web element?

1000


Define sdlc in testing.

1039


What are the main differences between Loadrunner and QTP tools? Describe briefly a "real world" scenario that would make you use the first one versus the other? Thank you for your answers....

2908


Tell me what is automation testing?

1019


What is test tool?

1005


wat would be the parameteries for ul testing for web applilcation

2145


Hi everyone, Are you looking for "worksoft certify" automation tool training online? We have experienced corporate Worksoft certify trainers. We also provide support Worksoft certify automation issues. Please contact us Automationsolutions@yahoo.com

1663


Tell me what databases can test director reside on?

939


Please explain what is the difference between findelement () and findelements ()?

1023


List out some of the automation tools which could be integrated with selenium to achieve continuous testing.

931