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 use of except clause?
what method you can use to reduce the overhead of Reporting Services data sources?
write an SQL query to list the employees who joined in the month of January?
What samples and sample databases are provided by microsoft?
What is the difference between stored procedure and functions?
Explain about builtinadministrator?
How do I view a script in sql server?
Can you pass expressions to stored procedure parameters?
Why should we go for stored procedures? Why not direct queries?
How to start and end transact-sql statements?
What is tcl in sql server?
Write the queries for commands like Create Table, Delete table, Drop Table etc.
What happens if date-only values are provided as date and time literals?
Suppose you want to implement the one-to-many relationships while designing tables. How would you do it?
What are truncate options available in sql server? : sql server database administration