Help Center > > Developer Guide> SQL Reference> SQL Syntax> DROP INDEX

DROP INDEX

Updated at: Mar 13, 2020 GMT+08:00

Function

DROP INDEX deletes an index.

Precautions

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

Syntax

1
2
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 Examples in CREATE INDEX.

Helpful Links

ALTER INDEX, CREATE INDEX

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel