Oracle7 Server Administrator's Guide

Contents Index Home Previous Next

Dropping Indexes

To drop an index, the index must be contained in your schema, or you must have the DROP ANY INDEX system privilege.

You might want to drop an index for any of the following reasons:

When you drop an index, all extents of the index's segment are returned to the containing tablespace and become available for other objects in the tablespace.

How you drop an index depends on whether you created the index explicitly with a CREATE INDEX statement, or implicitly by defining a key constraint on a table.

Note: If a table is dropped, all associated indexes are dropped automatically.

You cannot drop only the index associated with an enabled UNIQUE key or PRIMARY KEY constraint. To drop a constraint's associated index, you must disable or drop the constraint itself.

You can drop an explicitly created index with the SQL command DROP INDEX. For example, to drop the EMP_ENAME index, you would enter the following statement:

DROP INDEX emp_ename;

See Also: For information about analyzing indexes, see "Analyzing Tables, Indexes, and Clusters" [*].

For more information about dropping a constraint's associated index, see "Managing Integrity Constraints" [*].


Contents Index Home Previous Next