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 are the different SQL Server Versions you have worked on?
Which sql server is best?
How to insert multiple rows with a subquery?
What is the New in SQL server 2008?
What is the federation in sql azure?
Can group functions be used in the order by clause in ms sql server?
What is public role in sql server?
When would you use an insert into .. Select option versus an insert into .. Values option? Give an example of each?
What is the recursive stored procedure in sql server?
What is an example of a foreign key?
What are database states in ms sql server?
Do you know what is sql service broker?
What are the rendering extensions of ssrs?
What is dimension table? : sql server analysis services, ssas
Explain timestamp datatype?