Newest Tips & Tricks...
- Classic ASP file upload limit of 200kb in IIS 7L
- Find Column with Lower Case Text
- 0x8007232B DNS Name Does Not Exist Error on Windows Activation
- How to update a column with incrementing numbers
- How to get top N rows for each group?
- How to put a column into a delimited form
- How to export results of a stored procedure to a txt file
- Parsing delimited words from a column
- How to get N-th max value
- How to get a random row from a table
How to get N-th max value
declare @N int
set @N = 5
From Employee E1
Where (@N-1) = (Select Count(Distinct(E2.Salary)) From Employee E2 Where E2.Salary > E1.Salary)