sql怎么查看表有哪些索引 oracle數(shù)據(jù)庫(kù)中如何查看已經(jīng)創(chuàng)建的索引信息?
oracle數(shù)據(jù)庫(kù)中如何查看已經(jīng)創(chuàng)建的索引信息?oracle對(duì)于數(shù)據(jù)庫(kù)中的表信息,存儲(chǔ)在系統(tǒng)表中。查詢(xún)已創(chuàng)建好的表索引,可通過(guò)相應(yīng)的sql語(yǔ)句到相應(yīng)的表中進(jìn)行快捷的查詢(xún):1. 根據(jù)表名,查詢(xún)一張表的索
oracle數(shù)據(jù)庫(kù)中如何查看已經(jīng)創(chuàng)建的索引信息?
oracle對(duì)于數(shù)據(jù)庫(kù)中的表信息,存儲(chǔ)在系統(tǒng)表中。查詢(xún)已創(chuàng)建好的表索引,可通過(guò)相應(yīng)的sql語(yǔ)句到相應(yīng)的表中進(jìn)行快捷的查詢(xún):
1. 根據(jù)表名,查詢(xún)一張表的索引select * from user_indexes where table_name=upper("表名")
2. 根據(jù)索引號(hào),查詢(xún)表索引字段select * from user_ind_columns where index_name=("索引名")
3.根據(jù)索引名,查詢(xún)創(chuàng)建索引的語(yǔ)句select dbms_metadata.get_ddl("INDEX","索引名", ["用戶(hù)名"]) from dual --["用戶(hù)名"]可省,默認(rèn)為登錄用戶(hù)當(dāng)然,也可以用pl/sql developer工具來(lái)查看相關(guān)的表的各種信息。