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

select salary-1 from users where salary in (select
max(salary) from users);

Is This Answer Correct ?    0 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql server schema compare? How we can compare two database schemas?

557


but what if you have to create a database with two filegroups, one on drive c and the other on drive d with log on drive e with an initial size of 600 mb and with a growth factor of 15%? : Sql server database administration

525


What types of replication are supported in sql server?

560


Do you know what are the ways available in sql server to execute sql statements?

538


Determine when an index is appropriate?

554






What is cross join in sql server joins?

591


What is entity data services?

576


What is a heap?

615


How to declare and use cursor variables?

579


What is the difference between TRUNCATE and DROP?

627


What is CTE in SQL

538


Explain few of the new features of sql server 2008 management studio

521


How to create median function?

118


Explain differentiate between a having clause and a where clause?

508


Explain forward - only cursors?

513