oracle :
创建唯一索引:
create unique index 索引名称 on 表名(列字段);
普通索引:
单索引
create index 索引名称 on table(列字段);
删除索引
drop index 索引名称;
复合索引
create index 索引名称 ON 表名(字段1,字段2);
查询某张表中所有索引
select * from ALL_INDEXS where table_name = 表名;
查询某张表加了索引的列
select * from ALL_IND_COLUMN where table_name = 表名;
索引优缺点:
优点 : 加快查询速度
缺点 : 更新,要把索引也进行更新