Oracle - Index
How can we display all the indexes for a given table?
select index_name from dba_indexes where table_name='CMADT_SEARCH';
- http://dbaforums.org/oracle/index.php?showtopic=899
- http://www.dba-oracle.com/bk_show_indexes_in_oracle.htm
- http://blog.mclaughlinsoftware.com/2010/06/22/show-indexes-in-oracle/
How can we add index?
CREATE INDEX schemaName.indexName ON schemaName.tableName(columnName1, columnName2);
CREATE [UNIQUE] INDEX schemaName.indexName ON schemaName.tableName(columnName1[, columnName2...])
CREATE INDEX employee_first_last_name_idx ON employee (first_name, last_name);
There are different types of indexes. Need to document this question a bit further.
How can we drop an index?
DROP INDEX [schema_name.]index_name;
page revision: 4, last edited: 18 Mar 2021 21:48