Mysql method to modify the index type: 1. Use the "DROP INDEX index name ON table name;" statement to delete the original specified index; 2. Use "CREATE index type keyword INDEX index name ON table name (column Name [length])" statement creates an index with the same name to modify the type.
The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.
There is no direct instruction to modify the index in MySQL. Generally, we need to delete the original index first, and then create an index with the same name as needed, so as to modify the index in disguise.
mysql Modify index type
#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: