Say the table is created like this,
mysql> CREATE TABLE customer (id int, fname varchar(20));
The above table would be created without having an index. If there is a need to make id primary key, then
mysql> ALTER TABLE customer ADD PRIMARY KEY (id);
Then adding auto_increment would be as:
mysql> ALTER TABLE customer CHANGE id id int NOT NULL AUTO_INCREMENT;
Trying to assign auto_increment before making it a primary key – if it is not already done during creation, might produce an error. Actually trying to drop the primary key before neutralizing the auto_increment would also might create an error.
The following query would take out the auto_increment part from the table
ALTER TABLE customer CHANGE id id int not null;
And, of course, after this it is possible to drop primary key.