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...


how to calcuate the second highest salary of he employee

Answers were Sorted based on User's Feedback



how to calcuate the second highest salary of he employee..

Answer / shailesh

select sal from emp where sal=(select max(sal) from emp
where sal<(select max(sal) from emp);

Is This Answer Correct ?    0 Yes 1 No

how to calcuate the second highest salary of he employee..

Answer / jitendra

To get nth highest Salary, use below query

SELECT TOP 1 salary
FROM (
SELECT TOP nth salary
FROM Emp
ORDER BY salary DESC
) TmpTable
ORDER BY salary ASC

Replace nth with your number like second highest=2 4th=4 etc

Is This Answer Correct ?    0 Yes 3 No

how to calcuate the second highest salary of he employee..

Answer / vivek ghorad

select min(select top(2)salary from emp)from emp;

Is This Answer Correct ?    3 Yes 9 No

Post New Answer

More SQL PLSQL Interview Questions

How do we use distinct statement? What is its use?

0 Answers  


What is structural independence and why is it important?

0 Answers  


What is a boolean in sql?

0 Answers  


what is a trigger in mysql? Define different types of trigger. : Sql dba

0 Answers  


What are the two parts of design view?

0 Answers  


how to do backup entire database? : Transact sql

0 Answers  


What is an alias command?

0 Answers  


oracle is compiler or interpretter,can any one tell me the answer?

9 Answers   Satyam,


Why use triggers in sql?

0 Answers  


What is difference between table and view?

0 Answers  


Which is faster view or stored procedure?

0 Answers  


What do you understand by pl/sql packages?

0 Answers  


Categories