This statement drops a specific index from a designated table.
Syntax
DROP INDEX [ IF EXISTS ] [ table-name.]index-name [ IN DICTIONARY ]
table-name ::= user-defined-name
index-name ::= user-defined-name
Remarks
IN DICTIONARY is an advanced feature that should be used only by system administrators and when absolutely necessary. The IN DICTIONARY keyword allows you to drop an index from a DDF without removing the index from the underlying data file. Normally, Zen keeps DDFs and data files tightly synchronized, but this feature allows users the flexibility to force out-of-sync table dictionary definitions to match an existing data file. This can be useful when you want to create a new definition in the dictionary to match an existing data file.
Caution Modifying a DDF without performing corresponding modifications to the underlying data file can cause serious problems.
The expression IF EXISTS causes the statement to return success instead of an error if an index does not exist. IF EXISTS does not suppress other errors.
For more information on this feature, see the discussion under IN DICTIONARY.
Partial Indexes
When dropping partial indexes, the PARTIAL modifier is not required.
Examples
The following statement drops the named index from the Faculty table.
DROP INDEX Faculty.Dept
============
The following examples create a detached table, one with no associated data file, then add and drop an index from the table definition. The index is a detached index because there is no underlying Btrieve index associated with it.