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 |
|
lymni22
Starting Member
3 Posts |
Posted - 2004-08-27 : 05:10:41
|
How to select top 10 salary from the salary table?without using top10 commanduse inner querythanks in advance Lymni |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-08-27 : 05:46:09
|
| declare @n intset @n = 10 -- top 10th salarySelect * From Employee E1 Where (@n-1) = (Select Count(Distinct(E2.Salary)) From Employee E2 Where E2.Salary > E1.Salary) Go with the flow & have fun! Else fight the flow :) |
 |
|
|
|
|
|