- 查看
SHOW INDEX FROM table_name;
- 创建
CREATE INDEX index_name ON table_name (`filed1`, `filed2`);
- 删除
ALTER TABLE table_name DROP INDEX index_name;
- 修改
先删除再创建
SHOW INDEX FROM table_name;
CREATE INDEX index_name ON table_name (`filed1`, `filed2`);
ALTER TABLE table_name DROP INDEX index_name;
本文标题:2019-05-07 MySQL索引的创建、查看、删除
本文链接:https://www.haomeiwen.com/subject/eziyoqtx.html
网友评论