title: SQL Server 2005/2008 Finding nth highest salary
body: <p>For Finding nth highest salary I am using</p>
  
  <pre><code>select salary from 
    (
     select distinct ROW_NUMBER() over (order by salary desc) as rownum,Salary
     from Employee
    )a
    where rownum=2
  </code></pre>
  
  <p>However if  i have same salary like</p>
  
  <pre><code>70000
  70000
  60000
  50000
  50000
  </code></pre>
  
  <p>When executing the query i am getting second highest salary </p>
  
  <pre><code>70000 instead 60000 
  </code></pre>
  
  <p>how to avoid duplicates?</p>