• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. SQL Reference
  5. SQL Syntax
  6. DROP INDEX

DROP INDEX

Function

DROP INDEX deletes an index.

Precautions

Only the owner of an index or a system administrator can run DROP INDEX command.

Syntax

DROP INDEX [ CONCURRENTLY ] [ IF EXISTS ] 
    index_name [, ...] [ CASCADE | RESTRICT ];

Parameter Description

  • CONCURRENTLY

    Deletes an index without locking it. In general, during the deletion, the access of other statements to the tables that the index depends on is blocked. This keyword allows the access of other statements in this case.

    This option only specifies one index name, and CASCADE cannot be used in this case.

    The DROP INDEX command can be run within a transaction, but DROP INDEX CONCURRENTLY cannot be run in a transaction.

  • IF EXISTS

    Sends a notice instead of an error if the specified index does not exist.

  • index_name

    Specifies the name of the index to be deleted.

    Value range: An existing index.

  • CASCADE | RESTRICT
    • CASCADE: automatically deletes all objects that depend on the index to be deleted.
    • RESTRICT (default): refuses to delete the index if any objects depend on it.

Examples

See Example in CREATE INDEX.

Helpful Links

ALTER INDEX, CREATE INDEX