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

How to find table changes in sql server?

825


What is difference between clustered and non clustered index?

702


What is difference between drop truncate and delete?

733


What do you understand by triggers and mention the different types of it?

672


What is index fragmentation in ms sql server?

771






How you can get a list of all the table constraints in a database?

683


How to concatenate two binary strings together?

786


How to turn off warning messages during php execution?

722


What is triggers and stored procedures?

689


How to convert character strings into numeric values?

774


role of sql sever 2005 in database rather than any other database

1723


How to delete duplicate records based on single column from a table?

780


What is view in sql?

716


What are the basic features of a trigger in ms sql server?

791


Explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

868