PHP - How To Remove The AUTO-INCREMENT?

ikki-kun

New member
hey guys!
how can I remove the Autoincrement in my table?

I had this code in my table
"ALTER TABLE abform AUTO_INCREMENT=2700"

After I entered this code, I couldn't save anything to my database!
It says "Duplicate Entry '0' for key 1"....

How can I fix this problem?
 
ALTER TABLE abform CHANGE <auto_inc_field_name> <auto_inc_field_name> <data_type>(<size>) NOT NULL;

For example, if u have a field called id which is of type int(10) and auto increment, you can run this code to remove the auto increment from the id field.

ALTER TABLE abform CHANGE id id int(10) NOT NULL;

This should solve your problem!
 
Back
Top