title: MySQL PhpMyAdmin: Alter AUTO_INCREMENT and/or INSERT_ID
body: <p>I have an invoices table which stores a single record for each invoice, with the id column (<code>int AUTO_INCREMENT</code>) being the primary key, but also the invoice reference number.</p>
  
  <p>Now, unfortunately I've had to manual migrate some invoices generated on an old system which have a five digit id, instead of a four digit one which the current system uses.</p>
  
  <p>However, even when I reset the <code>AUTO_INCREMENT</code> through PhpMyAdmin (Table Operations) back to the next four digit id, it still inserts a five digit one being the higher id currently in the table plus one.</p>
  
  <p>From searching around, it would seem that I actually need to change the <code>insert_id</code> as well as the <code>AUTO_INCREMENT</code> ? I've tried to execute <code>ALTER TABLE invoices SET insert_id=8125</code> as well as <code>ALTER TABLE invoices insert_id=8125</code> but neither of these commands seem to be valid.</p>
  
  <p>Can anyone explain the correct way that I can reset the <code>AUTO_INCREMENT</code> so that it will insert records with id's <code>8125</code> onwards, and then when it gets to <code>10962</code> it will skip over the four records I've manually added and continue sequential id's from <code>10966</code> onwards. If it won't skip over <code>10962</code> - <code>10966</code> then this doesn't really matter, as the company doesn't generate that many invoices each year so this will occur in a subsequent year hence not causing a problem hopefully.</p>
  
  <p>I would really appreciate any help with this sticky situation I've found myself in! Many Thanks</p>