title: How to force MySQL to take 0 as a valid auto-increment value
body: <p>Long story short, I have a SQL file that I want to import as a <code>skel</code> style file, so this will be done repeatedly, programmatically. I can edit the SQL file however I want, but I'd rather not touch the application itself.</p>
  
  <p>This application uses <code>userid = 0</code> to represent the anonymous user. It also has a relevant (blank) entry in the database to represent this 'user'. Hence, the line in my <code>skel.sql</code> looks something like this:</p>
  
  <pre><code>INSERT INTO `{{TABLE_PREFIX}}users` VALUES (0, '', '', '', 0, 0, 0, '', '', 0, 0, 0, 0, 0, NULL, '', '', '', NULL);
  </code></pre>
  
  <p>The problem with this is that <code>uid</code> is a <code>auto_increment</code> field, for which, technically, <code>0</code> is an invalid value. Or atleast, if you set it to 0, you're basically telling MySQL, "Please insert the next id into this field."</p>
  
  <p>Now, I suppose I could put an <code>INSERT</code> then an <code>UPDATE</code> query into my SQL file, but is there a way of telling MySQL in general that yes, I actually want to insert <code>0</code> into this field?</p>