title: SQL RANK() versus ROW_NUMBER()
body: <p>I'm confused about the differences between these.  Running the following SQL gets me two idential result sets.  Can someone please explain the differences?</p>
  
  <pre><code>SELECT ID, [Description], RANK()       OVER(PARTITION BY StyleID ORDER BY ID) as 'Rank'      FROM SubStyle
  SELECT ID, [Description], ROW_NUMBER() OVER(PARTITION BY StyleID ORDER BY ID) as 'RowNumber' FROM SubStyle
  </code></pre>