Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Bsurendra99
Starting Member
5 Posts |
Posted - 2003-07-23 : 00:49:11
|
| How to fine the n th Max salary of an employee tablen th like 10 th Max salary |
|
|
pp
Starting Member
2 Posts |
Posted - 2003-07-23 : 01:51:40
|
| SELECT nameFROM Emp e1WHERE 3 = (SELECT COUNT(*) FROM Emp e2 WHERE e2.salary >= e1.salary) |
 |
|
|
joseph
Starting Member
10 Posts |
Posted - 2003-07-23 : 05:52:27
|
| select top 3 salaryfrom employee order by salary desc |
 |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2003-07-23 : 10:25:04
|
| This query should list the 9th highest salary.SELECT TOP 1 Name, SalaryFROM MytableWHERE Name NOT IN (SELECT TOP 8 FROM MyTable ORDER BY Salary DESC)ORDER BY Salary DESC |
 |
|
|
|
|
|