创建索引
1) 诧法结构:
a) create index 索引名 on 表名(列名)
b) create unique index 索引名 on 表名(列名)
注:添加unique表示在该表中的该列添加一个唯一性约束
示例:create index dept_dname_index on dept(dname);
查看索引
1) 诧法结构:
a) show index from 表名
示例:show index from dept
删除索引
1) 诧法结构:
a) drop index 索引名 on 表名;
示例:drop index dept_dname_index on dept;