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
What is exporting utility?
What are horizontal and vertical scaling?
Can two tables share a primary key?
You are doing log shipping due to some reasons it is failing. How you will proceed from there
What is a periodical index?
What is sql server programming?
What is a trigger what are the advantages of trigger?
Does table partitioning improve performance?
1. Tell me your daily activities 2. If sql server installation fails at time installation what will do 3. Where does the sql server installation log details are stored 4. After the installation what will you do for memory configuration 5. What is the difference between SQL max maximum memory and AWE memory 6. How will you configure AWE memory 7. How will setup an email alert for the backup job 8. After the SQL installation what are the jobs will you configure 9. What does –g mean in the sql startup parameter 10. What is the difference between Bulked log and Full recovery model 11. What is the difference between mirroring and log shipping 12. What are the steps to be followed before in-place up gradation 13. After installing the patch the sql server does not start and application team tells to rollback the changes .In this scenario what will you do
What is a partition function in sql server?
How to write a query with a right outer join in ms sql server?
What is the stuff?
Describe how to use the linked server?
How to send email from database?
What are sql dirty pages?