Click to See Complete Forum and Search --> : cant seem to change auto increment


popcop
12-10-2004, 07:19 AM
im in my phpadmin and im trying to add auto increment to my ID field but i keep gettin this error

SQL-query:


ALTER TABLE `poll` CHANGE `id` `id` INT( 11 ) AUTO_INCREMENT


MySQL said:
#1075 - Incorrect table definition; There can only be one auto column and it must be defined as a key


whats goin wrong

pyro
12-10-2004, 08:09 AM
You can only have one auto_increment field, and it must be defined as a key (Primary, Index, or Unique - in phpMyAdmin, they are the radio buttons to the right of the auto_increment dropdown).