title: How to add sequence number column into result data?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/9150378/add-row-number-to-this-t-sql-query">Add row number to this T-SQL query</a>  </p>
  </blockquote>
  
  
  
  <p>Im using sql server 2008.</p>
  
  <p>When I type: select * from Employee. The result like this:</p>
  
  <pre><code>EmpID    |    EmpName    |    Salary
  -------------------------------------
  DB1608   |    David      |    100000
  JT2607   |    John       |    150000
  AM1707   |    Ann        |    140000
  ML1211   |    Mary       |    125000
  </code></pre>
  
  <p>But I want the result like this:</p>
  
  <pre><code>No      |    EmpID    |    EmpName    |    Salary
  --------------------------------------------------
  1       |    DB1608   |    David      |    100000
  2       |    JT2607   |    John       |    150000
  3       |    AM1707   |    Ann        |    140000
  4       |    ML1211   |    Mary       |    125000
  </code></pre>
  
  <p>The column "No" is the auto increment number, and NOT the identity field in this table.</p>
  
  <p>How can I do this?</p>