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 / bobby
select p.emp_id,p.name,p.salary from
( select emp_id,name,salary,dense_rank()over( order by
salary desc)rank
from empTable )p
where rank=2
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Does a specific recovery model need to be used for a replicated database? : sql server replication
What is the importance of a recovery model?
What is the difference function and stored procedure?
What do you understand by a view? What does the with check option clause for a view do?
Why use identity in sql server?
What are the character string functions supported by sql server 2005?
What are out-of-range errors with date and time literals?
can a table be moved to different filegroup? : Sql server administration
You want to implement the one-to-one relationship while designing tables. How would you do it?
How to display a past time in days, hours and minutes?
How to set the current database in ms sql server?
What is database isolation in sql server? : sql server database administration
What is partitioned view?
What is the maximum rows in sql server table?
Difference between Inner vs outer joins?