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 do I debug a stored procedure?

0 Answers  


Explain commit, rollback and savepoint.

0 Answers  


what is inline command?

2 Answers  


Can you rollback after commit?

0 Answers  


What are the different types of joins and explain them briefly.

3 Answers  


how to calculate the difference between two dates? : Sql dba

0 Answers  


i have a word ***********hello********world******. I require a o/p **********hello world**********, Need to delete the middle stars.

3 Answers  


What is the difference between a query and a report?

0 Answers  


Is left join inner or outer by default?

0 Answers  


What is a design view?

0 Answers  


How to return multiple rows from the stored procedure?

0 Answers  


Which is the correct statement about truncate and delete?

0 Answers  


Categories