查看索引
show index from 表
show index from 表\G 格式化输出
create table 创建普通索引
index(字段)
唯一性索引 创建字段后加 unique
create 创建普通索引
create index 索引名称 on 表(字段)
前缀索引
create index 索引名称 on 表(字段(个数)asc|desc)
组合索引
create index 索引名称 on 表(字段,字段)
用alter 创建索引
alter table 表 add index 索引名(字段名)
删除索引
drop index 索引名 on 表;
alter table 表 drop index 索引名;