oracle索引简单使用

--查询表索引
select * from user_ind_columns where table_name = upper('HY_PROJECT')
and column_name = upper('PRO_ID');
--创建索引
CREATE UNIQUE INDEX HY_PROJECT_PRO_ID on HY_PROJECT(PRO_ID);
--处理索引产生的碎片,重建索引或者合并索引
    --合并索引,无需额外存储空间
    alter index HY_PROJECT_PRO_ID coalesce;
    --重建索引
    alter index HY_PROJECT_PRO_ID rebuild;
--删除索引
drop index HY_PROJECT_PRO_ID;
原文地址:https://www.cnblogs.com/xmqa/p/8175704.html