|
|
The DROP INDEX statement deletes the specified index.
ISQL or Application Programs
DROP INDEX [Owner.]IndexName][FROM][Owner.]TableName]
- [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.
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.
You can issue this statement if you have INDEX or OWNER authority
for the table or if you have DBA authority.
DROP INDEX PartsOrderedIndex
FROM PurchDB.OrderItems
Alternatively:
DROP INDEX PurchDB.PartsOrderedIndex
If you discover that an index does not improve the speed of
data access, you can delete it. If applications change, you can
redefine the index.
|