title: Reseed an identity column after sorting
body: <p>I have a table 'TABLE1' with the following columns:</p>
  <pre><code>col1 varchar(10),
  col2 varchar(100),
  col3 int identity(1,1)
  </code></pre>
  <p>I have performed some operations on this table to insert some data into it. Once complete, I want to reassign the value of col3 after sorting by col1 and col2. I have tried using the window function <code>row_number()</code> for this but it does not serve my purpose due to the following reason.</p>
  <p>This table is a temporary table. Everyday, data is deleted from this table. On day 1, say there are 10 rows inserted into this table, I need col3 to have values 1 to 10. On day 2, since I am just truncating the data from this table, the data in col3 starts from 11 to 20. If I need to reseed this value on day 2, I would need to start from 11 and not from 1 and hence cannot use <code>row_number()</code>.</p>
  <p>Is there any way to use a sort with the reseed functionality in SQL Server? Or what would be an alternative to solving this issue?</p>