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

How does postgresql compare to mysql?

0 Answers  


How can I speed up sql query?

0 Answers  


What are all ddl commands?

0 Answers  


What are the syntax and use of the coalesce function?

0 Answers  


how to write date and time literals? : Sql dba

0 Answers  


What are the different sql commands?

0 Answers  


Where is pl sql used?

0 Answers  


How to connect a sql*plus session to an oracle server?

0 Answers  


what is the command line end user interface - mysql? : Sql dba

0 Answers  


What is the difference between an inner and outer join?

0 Answers  


Why primary key is required?

0 Answers  


What is sql basics?

0 Answers  


Categories