Mysql method to modify the index: 1. Use the "DROP INDEX index name ON table name" statement to delete the original index; 2. Use "ALTER TABLE table name ADD INDEX index name [index type] (column name,... )" statement can create an index with the same name as needed.
The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.
In mysql, the index cannot be modified directly. You can modify the index by deleting the original index and then creating an index with the same name as needed.
1. Delete the original index
When the index is no longer needed, you can use the DROP INDEX statement to delete the index.
Grammar format:
DROP INDEX <索引名> ON <表名>
The syntax description is as follows: