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

Difference between a query and strored procedure?

4 Answers   Microsoft,


What is the relation b/w view and trigger

3 Answers   Accenture, TCS,


what is sql server agent? : Sql dba

0 Answers  


How do I kill a query in postgresql?

0 Answers  


What is dml statement?

0 Answers  


What is data type in sql?

0 Answers  


How do I write a sql query in pgadmin 4?

0 Answers  


Can we insert data into materialized view?

0 Answers  


What is PL/SQL table ?

6 Answers  


what is an index? : Sql dba

0 Answers  


how to add a new column to an existing table in mysql? : Sql dba

0 Answers  


describe transaction-safe table types in mysql : sql dba

0 Answers  


Categories