# 删除索引 Joe 想要删除创建在 goods 表创建的索引,但是他已经忘了这个索引的名字,那么他应该怎么做?
点击进入[MySQL实战练习环境](https://mydev.csdn.net/product/pod/new?image=cimg-centos7-skilltreemysql&connect=auto&create=auto&utm_source=skill){target="_blank"}。 * `show databases;` 列出所有数据库 * `show tables;` 列出所有表 ## 答案 执行 ```sql show index from goods; ``` 查看 goods 表的索引(假设查到是 idx_goods_category),然后执行 ```sql alter table goods drop index idx_goods_category; ``` ## 选项 ### A 执行 ```sql show index from goods; ``` 查看 goods 表的索引(假设查到是 idx_goods_category),然后执行 ```sql alter table goods delete index idx_goods_category; ``` ### B 执行 ```sql show index from goods; ``` 查看 goods 表的索引(假设查到是 idx_goods_category),然后执行 ```sql alter table goods remove index idx_goods_category; ``` ### C 执行 ```sql show index from goods; ``` 查看 goods 表的索引(假设查到是 idx_goods_category),然后执行 ```sql alter table goods drop idx_goods_category; ```