Neoview SQL Reference Manual (R2.3)

DROP INDEX Statement
“Syntax Description of DROP INDEX”
“Considerations for DROP INDEX”
“Example of DROP INDEX”
The DROP INDEX statement deletes a Neoview SQL index. See “Database Object Names”
(page 206).
DROP INDEX is a Neoview SQL extension.
DROP [VOLATILE] INDEX index [RESTRICT|CASCADE]
Syntax Description of DROP INDEX
index
is the index to drop.
For information, see “Identifiers” (page 230).
RESTRICT
If you specify RESTRICT and the index is being used to validate a constraint, the index is not
dropped. The default is RESTRICT.
CASCADE
If you specify CASCADE and the index is being used to validate a constraint, the constraint
and index are dropped.
Considerations for DROP INDEX
Authorization and Availability Requirements
To drop an index, you must be the owner of the index or the owner of the schema.
Indexes That Support Constraints
Neoview SQL uses indexes to implement some constraints. You cannot use DROP INDEX to
drop an index that implements a constraint unless you use the CASCADE option. Use CASCADE
to drop all constraints that use the index, including those that indirectly use it. Alternately, if
you use the DROP CONSTRAINT option in an ALTER TABLE statement, Neoview SQL drops
indexes that it created to implement that constraint.
Example of DROP INDEX
This example drops an index:
DROP INDEX myindex;
This example drops a volatile index:
DROP VOLATILE INDEX vindex;
DROP INDEX Statement 95