Mysql method to delete unique constraints: 1. Use the "alter table table name drop index constraint name;" syntax to delete; 2. Just delete the index index directly.
The operating environment of this article: Windows 7 system, Mysql version 5.7.14, Dell G3 computer.
How to delete a unique constraint in mysql?
Mysql deletes a unique constraint:
The unique constraint is also an index.
Therefore, when deleting the constraint, use the alter syntax to delete the index:
alter table 表名 drop index 约束名;
Or delete the index index directly.
Recommended learning: "mysql video tutorial"
The above is the detailed content of How to delete unique constraint in mysql. For more information, please follow other related articles on the PHP Chinese website!