The method of removing Primary key constraint by mysql
Editor to share with you how mysql removes primary key constraints. I hope you will gain a lot after reading this article. Let's discuss it together.
Mysql removes the primary key constraint by first executing the [Alter table tb change id id int (10);] command to delete self-growth, and then executing the [Alter table tb drop primary key;] command to delete the primary key.
First delete self-growth
Alter table tb change id id int (10); / / delete self-growth
Then delete the primary key
Alter table tb drop primary key;// delete the main construction finished reading this article, I believe you have a certain understanding of mysql to remove primary key constraints, want to know more related knowledge, welcome to follow the industry information channel, thank you for reading!