Mysql method to remove primary key constraints: First execute the [Alter table tb change id id int(10);] command to delete the auto-increment; then execute the [Alter table tb drop primary key;] command to delete the primary key.
First delete the self-increase
(Recommended tutorial:mysql tutorial)
Alter table tb change id id int(10);//删除自增长
Then delete Primary key
Alter table tb drop primary key;//删除主建
Related recommendations:php training
The above is the detailed content of How to remove primary key constraints in mysql. For more information, please follow other related articles on the PHP Chinese website!