SQL$HELP72.HLB  —  DROP  INDEX
    Deletes the specified index definition. If you attach to the
    database using the PATHNAME qualifier, SQL also deletes the index
    definition from the repository.

1  –  Environment

    You can use the DROP INDEX statement:

    o  In interactive SQL

    o  Embedded in host language programs to be precompiled

    o  As part of a procedure in an SQL module

    o  In dynamic SQL as a statement to be dynamically executed

2  –  Format

  (B)0DROP INDEX qqq> <index-name> qqwqwqqqqqqqqqqqqqqqwqwq>
                                 x tq> RESTRICT  qqu x 
                                 x tq> CASCADE   qqu x 
                                 x mq> IF EXISTS qqj x 
                                 mqqqqqqqqqq<qqqqqqqqj

3  –  Arguments

3.1  –  CASCADE

    Specifies that you want SQL to modify any storage map that uses
    this index to be a NO PLACEMENT VIA INDEX storage map.

3.2  –  IF_EXISTS

    Prevents SQL command language from displaying error messages if
    the referenced object does not exist in the database.

3.3  –  index-name

    Specifies the name of the index definition you want to delete.

3.4  –  RESTRICT

    Prevents the removal of an index if it is referenced by any other
    object within an Oracle Rdb database. RESTRICT is the default.

4  –  Examples

    Example 1: Deleting an index from the default database

    SQL> ATTACH 'FILENAME personnel';
    SQL> DROP INDEX DEG_COLLEGE_CODE;
    SQL> COMMIT;

    Example 2: Deleting an index from one of several attached
    databases

    SQL> ATTACH 'FILENAME personnel';
    SQL> ATTACH 'ALIAS MF FILENAME mf_personnel';
    SQL> ATTACH 'ALIAS CORP FILENAME corporate_data';
    SQL> SET QUOTING RULES 'SQL99';
    SQL> DROP INDEX "CORP.ADMINISTRATION".PERSONNEL.EMP_EMPLOYEE_ID;
    SQL> COMMIT;
Close Help