ALLBASE/SQL Reference Manual (36216-90216)

Chapter 10 399
SQL Statements A - D
DROP INDEX
DROP INDEX
The DROP INDEX statement deletes the specified index.
Scope
ISQL or Application Programs
SQL Syntax
DROP INDEX [
Owner.
]
IndexName
][FROM][
Owner.
]
TableName
]
Parameters
[
Owner
.]
IndexName
is the name of the index to be dropped. It may include the name of
the owner of the table which has the index.
[
Owner
.]
TableName
is the name of the table upon which the index was created.
Description
If a table name is not specified, the index name must be unique for the specified or
implicit owner. The implicit owner, in the absence of a specified table or owner, is the
current DBEUserID.
Only indexes appearing in the system view SYSTEM.INDEX may be removed with this
statement. Hash table structures cannot be dropped by using this statement; the hash
structure can only be removed by dropping the table with the DROP TABLE statement.
Neither unique constraint indexes nor referential constraint virtual indexes can be
dropped with this statement. Constraints can only be removed through the ALTER
TABLE DROP CONSTRAINT statement or the DROP TABLE statement.
Issuing the DROP INDEX statement can invalidate stored sections. Refer to the
ALLBASE/SQL Database Administration Guide for additional information on section
validation.
If no index owner is specified and no table is specified, the default owner is the current
DBEUserID.
If no index owner is specified and a table is specified, the default rule owner is the table
owner.
If a table is specified and no owner is specified for it, the default table owner is the
current DBEUserID.
The table and index owners must be the same.
Authorization
You can issue this statement if you have INDEX or OWNER authority for the table or if
you have DBA authority.