Page 1 of 19

Drop Index

Posted: Thu Jan 19, 2012 2:01 pm
by jimb
Below is the step on how to drop index in Oracle.
DROP INDEX <schema>.<index_name>;
If you omit schema, then Oracle Database assumes the index is in your own schema.

E.g. Below statement drops an index namde idx1.
DROP INDEX idx1;
or
DROP INDEX user.idx1;

Re: Drop Index

Posted: Thu Jan 19, 2012 2:22 pm
by Kristoff
Drop an Index

The syntax for dropping an index is:
DROP INDEX index_name;
For example:
DROP INDEX idx_contact;
In this example, we're dropping an index called idx_contact.

Re: Drop Index

Posted: Fri Feb 17, 2012 4:34 pm
by jimb
For Oracle Database 10g, you can find below how to drop an index.

What's DROP INDEX for?

We use the statement DROP INDEX to remove an index or domain index from the database.
As the index is dropped, Oracle Database invalidates all objects that depend on the underlying table, including views, packages, package bodies, functions, and procedures.

Prerequisites:

The index must be in your own schema or you must have the DROP ANY INDEX system privilege in order to perform the DROP INDEX statement.

SYNTAX:

DROP INDEX <schema>.<index_name> FORCE;

schema:
Specify the schema containing the index. If you omit schema, then Oracle Database assumes the index is in your own schema.

index:
Specify the name of the index to be dropped. When the index is dropped, all data blocks allocated to the index are returned to the tablespace that contained the index.

Restriction on Dropping Indexes

You cannot drop a domain index if the index or any of its index partitions is marked IN_PROGRESS.

FORCE:

FORCE applies only to domain indexes. This clause drops the domain index even if the indextype routine invocation returns an error or the index is marked IN PROGRESS. Without FORCE, you cannot drop a domain index if its indextype routine invocation returns an error or the index is marked IN PROGRESS.

Example:

Dropping an Index:

This statement drops an index named SALARY_IX owned by schema HR

SQL> DROP INDEX HR.SALARY_IX;
SQL> DROP INDEX HR.SALARY_IX;

Index dropped.

SQL>

Re: Drop Index

Posted: Sun Mar 10, 2024 8:42 pm
by xaeresis

Re: Drop Index

Posted: Sun Mar 10, 2024 8:43 pm
by xaeresis

Re: Drop Index

Posted: Sun Mar 10, 2024 8:44 pm
by xaeresis

Re: Drop Index

Posted: Sun Mar 10, 2024 8:45 pm
by xaeresis

Re: Drop Index

Posted: Sun Mar 10, 2024 8:47 pm
by xaeresis

Re: Drop Index

Posted: Sun Mar 10, 2024 8:48 pm
by xaeresis

Re: Drop Index

Posted: Sun Mar 10, 2024 8:49 pm
by xaeresis