1.查看表上的索引
-- 查看table_name表上的索引
show index from table_name ;
2.刪除表上的索引
刪除索引可以使用ALTER TABLE或DROP INDEX語句來實現。DROP INDEX可以在ALTER TABLE內部作為一條語句處理,其格式如下:
-- 刪除了table_name表中的索引index_name
drop index index_name on table_name ;
-- 刪除了table_name表中的索引index_name
alter table table_name drop index index_name ;
-- 刪除table_name表的主鍵索引,一個表只可能有一個PRIMARY KEY索引,因此不需要指定索引名。
alter table table_name drop primary key ;