创建索引方式:
1、create index 索引名 on 表名 (字段)
2、alter table 表 add index 索引名 (字段)
-- 普通索引 alter table 表名 add index 索引名 (字段) ; -- 唯一索引 alter table 表名 add unique (字段) ; -- 主键索引 alter table 表名 add primary key (字段) ;
删除索引:
drop index 索引名 on 表名
创建索引方式:
1、create index 索引名 on 表名 (字段)
2、alter table 表 add index 索引名 (字段)
-- 普通索引 alter table 表名 add index 索引名 (字段) ; -- 唯一索引 alter table 表名 add unique (字段) ; -- 主键索引 alter table 表名 add primary key (字段) ;
删除索引:
drop index 索引名 on 表名