StatCounter

View My Stats

Tuesday, February 5, 2008

To found n'th Salary Of a Recods:SQl Server

The query as Follows:

select top 1 salary from (select distinct top 2 salary from table1 order by salary desc) a order by salary

Here
salary-Column Name
table1-Table Name
a-Concatenation..It may be any other character

No comments: