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 / ashish kumar

To find nth maximum salry

Select salary from tbl_name a where
n-1=(Select count(distinct(count(*))) from tbl_name b
where b.salary>a.salary)

Is This Answer Correct ?    10 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by cardinality?

487


what does the automatic recovery do? : Sql server administration

531


Is sql server a database?

529


What are information schema views?

546


How to provide login information for a new odbc dsn?

536






I create a separate index on each column of a table. What are the advantages and disadvantages of this approach? : Sql server database administration

575


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

523


What are different types of statement?

523


What is a hint?

577


Explain about extended stored procedure?

486


How to include text values in sql statements?

583


Types of Authentications in Sql Server? How user gets authenticated through windows authentication?

561


Mention the different types of replication in sql server.

561


What is the difference between clustered index and primary key?

500


How to create an identity column?

635