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 get second highest salary from a table

Answers were Sorted based on User's Feedback



How to get second highest salary from a table..

Answer / senthil

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

Is This Answer Correct ?    13 Yes 1 No

How to get second highest salary from a table..

Answer / srinivas

select * from emp m where(select count(distinct sal)+1 from emp s where s.sal>m.sal)=2

Is This Answer Correct ?    7 Yes 3 No

How to get second highest salary from a table..

Answer / saiz

select min(salary)
from emp
where salary in ( select top 2 salary
from emp
order by salary desc);

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Differentiate between syntax and runtime errors.

0 Answers  


what tools available for managing mysql server? : Sql dba

0 Answers  


What is an inconsistent dependency?

0 Answers  


What is the differnce between view and materialized view

4 Answers   TCS,


What is Materialized View? In What Scenario we Use Materialized View?

2 Answers   Dinesh, Marlabs,


What does select * from mean in sql?

0 Answers  


Types of backups ?

3 Answers   TCS,


How to run sql*plus commands in sql developer?

0 Answers  


Is postgresql a nosql database?

0 Answers  


How many functions are there in sql?

0 Answers  


What are the 3 modes of parameter?

0 Answers  


How run sql*plus commands that are stored in a local file?

0 Answers  


Categories