mysql> desc t7; +-------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+-------+ | name | varchar(20) | YES | | NULL | | | id | int(4) | YES | | NULL | | +-------+-------------+------+-----+---------+-------+ 2 rows in set (0.00 sec)
mysql> alter table t7 add id2 int(4) auto_increment; ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key