首頁  >  文章  >  資料庫  >  oracle怎麼刪除索引

oracle怎麼刪除索引

WBOY
WBOY原創
2022-01-21 15:10:0228280瀏覽

在oracle中,可以利用「drop index」語句刪除索引,該語句的作用就是刪除指定的索引,語法為「drop index 索引名;」。

oracle怎麼刪除索引

本教學操作環境:Windows10系統、Oracle 11g版、Dell G3電腦。

oracle怎麼刪除索引

drop index index_name;

#1、建立索引

create index 索引名 on 表名(列名);

2、刪除索引

drop index 索引名;

3、建立組合索引

create index 索引名 on 表名(列名1,,列名2);

4、查詢索引

--根据索引名,查询表索引字段
select * from user_ind_columns where index_name='索引名';
--根据表名,查询一张表的索引
select * from user_indexes where table_name='表名';

推薦教學:《Oracle教學

以上是oracle怎麼刪除索引的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn