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
How to create prepared statements using odbc_prepare()?
Tell me what is difference between clustered and non clustered index?
Explain how to send email from sql database?
How many cores do I need for sql server 2016?
How to use subqueries with the in operators in ms sql server?
Difference between drill down and drill through report.
What are the different authentication modes in sql server?
What are the different types of sql server replication? : sql server replication
What is the federation in sql azure?
Mention a few common trace flags used with sql server?
Can a cursor be updated? If yes, how you can protect which columns are updated?
What is log shipping? Can we do logshipping with SQL Server 7.0 ?
What is the process of indexing?
What is collation?
What is use of except clause? How does it differ from not in clause?