How to find the second largest salary in the emp database and
also How to find 3rd,4th and so on ........ in the emp database

plz mail the answer @ mak2786@gmail.com

Answer Posted / subhranghshu bhattacharjee

first find second largest salary in the emp database:

select min(sal)sal from(select sal from emp order by sal
desc)
where rownum<3
u can find 3rd,4th... so on ,only change rownum
like rownum<4,rownum<5 ... so on

Is This Answer Correct ?    10 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Beginning with sql server version 7 0, a new enhanced data type nchar was added what type of data is supported with this data type?

518


Does partitioning improve performance?

490


What is correlated subquery in sql server?

559


What are the five characteristics of good data?

518


What are the difficulties faced in cube development? : sql server analysis services, ssas

609






Can you pass expressions to function parameters?

543


What is the openxml statement in sql server?

537


Difference between Logical Page and Physical Page in SSRS.

340


let's assume you have data that resides on sql server 6.5. You have to move it sql server 7.0. How are you going to do it? : Sql server database administration

503


what is database replication? : Sql server database administration

532


Why can there be only one clustered index and not more than one?

546


What are the hotfixes and patches in sql server?

547


What are the different types of replication are there in sql server 2000?

563


Explain some stored procedure creating best practices or guidelines?

523


What are the transaction properties?

552