title: Reset auto increment and reset ids of remaning rows
body: <p>Currently i run a script which will delete every row with a timestamp older than 30 days</p>
  
  <pre><code>DELETE FROM table WHERE `timestamp` NOT BETWEEN NOW() - INTERVAL 30 DAY AND NOW()
  </code></pre>
  
  <p>Everything works great but i'd like to clean up the remaning tables.</p>
  
  <p>Sample problem</p>
  
  <p>I have a table with 300 rows, i delete the first 295 rows i am now left with 5 rows with the ids 296, 297, 298, 299 and 300.</p>
  
  <p>I'd like to reset auto increment to 1 and update the current rows so they are 296->1, 297->2, 298->3, 299->4, 300->5.</p>
  
  <p>Is there anything built in to do this ?</p>
  
  <p>Currently i use this SQL to fix the starting point of the auto increment <code>ALTER TABLE table AUTO_INCREMENT = 1</code></p>
  
  <p>The SQL is great but wont start from 1 if there is already id's above 1, in this example 296, 297, 298, 299 and 300 then the next row will start from 301.</p>
  
  <p>What area my options is there anything built in to change 296->1, 297->2, 298->3, 299->4, 300->5 ? or what are the possibilities, i havent ben able to find anything on the subject.</p>