title: Function to generate incrementing numbers in SQL Server
body: <p>Is there any way to select from a function and have it return incrementing numbers?</p>
  
  <p>For example, do this:</p>
  
  <pre><code>SELECT SomeColumn, IncrementingNumbersFunction() FROM SomeTable
  </code></pre>
  
  <p>And have it return:</p>
  
  <pre><code>SomeColumn | IncrementingNumbers
  --------------------------------
  some text  | 0
  something  | 1
  foo        | 2
  </code></pre>