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 / neon

select salary from emp
where salary = (select max(salary) from emp
where salary <>(select max(salary) from emp)

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to enforce security in sql server? : sql server security

602


how can a database be repaired? : Sql server administration

496


How to restore performance issues and how to check?

1499


What is the default sql server instance name?

537


Where views are stored in sql server?

535






How to get a list of columns in a view using "sys.columns" in ms sql server?

497


Differentiate between truncate vs delete in mssql?

506


Ms sql server index?

506


What command do we use to rename a database?

595


What is self contained scalar sub query?

511


What are the limitations/drawbacks or ssrs 2008 r2?

84


What is difference in performance between insert top (n) into table and using top with insert?

513


What is report snapshot?

99


What is the impact on other user sessions when creating indexes?

523


What are the recovery models for a database?

595