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

Name some usages of database trigger?

0 Answers  


How do I run a sql script?

0 Answers  


Hi Everyone, How to get fist and last record from a table in oracle? Thanks in advance

13 Answers   IBM,


What jobs use sql?

0 Answers  


what are the different functions in sorting an array? : Sql dba

0 Answers  


What are views in sql?

0 Answers  


How do you truncate?

0 Answers  


what will be the output: select 1 from emp union all select 2 from emp;

2 Answers   iNautix,


What is number function in sql?

0 Answers  


Explain the purpose of %type and %rowtype data types?

0 Answers  


what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba

0 Answers  


Does SQL*Plus contains pl/sql Engine?

1 Answers   TCS,


Categories