Sunday, April 17, 2005

Resolving ERROR 1075: Incorrect table definition; There can only be one auto column and it must be defined as a key

mysql> alter table test add orig_order int unsigned auto_increment;
ERROR 1075: Incorrect table definition; There can only be one auto column and it must be defined as a key
mysql> alter table test add orig_order int unsigned auto_increment, add key(orig_order);
Query OK, 1221 rows affected (0.10 sec)
Records: 1221 Duplicates: 0 Warnings: 0

1 comment:

Anonymous said...

Thanks, phpmyadmin was having none of it for some reason.