title: Select alternate rows from SQL Server table
body: <p>I am working with SQL Server 2008. I have a table which does not contain any unique columns; how to get alternate rows from it?</p>
  <p>SQL Server table:</p>
  <pre><code>+-----+--------+
  |  id |  name  |
  |-----+--------|
  |  1  |  abc   |
  |  2  |  pqr   |
  |  2  |  pqr   |
  |  3  |  xyz   |
  |  4  |  lmn   |
  |  5  |  efg   |
  |  5  |  efg   |
  +-----+--------+
  </code></pre>
  <p>As we've to come with at least one working suggestion with the question, I've tried below code; which is not so proper technique when fetching from a huge amount of data.</p>
  <p>Trial:</p>
  <pre><code>create table #tmp
  (
      id int, name varchar(10), srNo int
  )
  
  insert into #tmp
     select 
        id, name,
        ROW_NUMBER() OVER (ORDER BY id) % 2 as srNo   --,alternate rows
     from 
        Employee
  
  select * 
  from #tmp 
  where srNo = 1 --or srNo = 0
  </code></pre>
  <p>Above query gives out alternate rows i.e. 1st, 3rd, 5th <em>OR</em> 2nd, 4th, 6th etc.</p>
  <p>Please help me out with <strong>proper way</strong> <em>without <code>#tmp</code></em> to achieve the goal!</p>