title: Is it possible to have an AUTO_INCREMENT column that permits duplicates?
body: <p>I have a table that has an <code>AUTO_INCREMENT</code> field.  Currently, it is also a PRIMARY KEY.</p>
  
  <p>However, there are situations where I need this <code>AUTO_INCREMENT</code> column to permit duplicates.  In other words - two different rows can have the same value inside the <code>AUTO_INCREMENT</code> column.  This would mean having an AUTO_INCREMENT field that is not a PRIMARY KEY.</p>
  
  <p>Is this possible?</p>
  
  <p>I'm guessing it's not, since whenever I try to do it, I get this error:</p>
  
  <p><code>ERROR 1075 (42000) at line 130: Incorrect table definition; there can be only one auto column and it must be defined as a key</code></p>
  
  <p>I like to have the AUTO_INCREMENT field because it saves me from having to manually store / increment a separate counter elsewhere in my database.  I can just insert into the table and grab the value that was inserted.  However, if I can't have duplicates, it seems like I'm going to be stuck with using a separate table to track and manually increment this field.</p>
  
  <p>UPDATE: As a quick clarification, I am already familiar with grouping the AUTO_INCREMENT field with another key, <A HREF="http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html" rel="nofollow noreferrer">as described here</A>.  Let's assume for the sake of argument that this solution won't work due to other constraints in the database.</p>