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

Can a table have no primary key?

0 Answers  


How to copy a table in another table with datas?

9 Answers  


How to avoid using cursors?

0 Answers  


What is data abstraction in sql?

0 Answers  


What is meant by temporal data?

0 Answers  


how can you create an empty table from an existing table? : Sql dba

0 Answers  


what is subquery? : Sql dba

0 Answers  


Whate is use of MOD function in pl/sql.

3 Answers   Oracle,


Can any one tell me how to increase the performance of a sql query ie what are the performance tips in creating or writing a sql query !!?

3 Answers   eBay,


how will i became good database developer?

1 Answers  


What are types of joins?

0 Answers  


What are two virtual tables available during database trigger execution ?

2 Answers  


Categories