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 / sarat
TO FIND THE Nth HIGHEST SAL IN EMP TABLE
SELECT MIN (salary) as NthSalary FROM emptable WHERE
salary IN ( SELECT DISCINCT TOP N salary FROM emptable
ORDER BY salary DESC )
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
What is sql server replication? : sql server replication
how you can deploy an ssrs report?
What are trace flags?
What are Row versions of DataRow?
What happens if null values are involved in bitwise operations?
What type of Index will get created after executing the above statement?
What are scheduled tasks in sql server?
Explain nested stored procedure. Syntax and an example for create nested stored procedure?
Can you explain what is the use of custom fields in report?
What is the main difference between ‘between’ and ‘in’ condition operators?
How to delete an existing database user?
What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?
What do you mean by authentication modes in sql server?
Explain hostprotectionattribute in sql server 2005?
What is the purpose of sql profiler in sql server?