title: How to find all of the fifth highest salaried employees in a single query in SQL Server
body: <p>How to find all of the fifth highest salaried employees in a single query in SQL Server</p>
  
  <pre><code>DECLARE @result bigint
  
  SELECT TOP 5 @result = EmpID FROM Employees ORDER BY Salary DESC
  
  SELECT @result
  </code></pre>
  
  <p>Above query gives me the exactly one record at the fifth highest position,
  but I want <code>all</code> of the <code>fifth</code> highest salaried <code>EmpID's</code> in <code>Employees</code> table.</p>
  
  <p>Above query is referenced from <a href="https://stackoverflow.com/questions/358542/how-to-find-fifth-highest-salary-in-a-single-query-in-ms-sql-server">How to find fifth highest salary in a single query in SQL Server</a></p>