DROP INDEX
statementsupportedTables, views, streams, sequencesDrops a secondary index. Generally available to accounts in AWS, Microsoft Azure, and Google Cloud commercial regions. For more information, see Clouds and regions.
Syntax
supportedpartialnot supportednot scored
DROP INDEX [ IF EXISTS ] <table_name>.<index_name>
Parameters
| Name | Required | Description |
|---|---|---|
table_name | Specifies the identifier for the table. | |
index_name | Specifies the identifier for the index. |
Usage notes
- This command can only be used to drop a secondary index. To drop an index that is used to enforce a UNIQUE or FOREIGN KEY constraint, use the ALTER TABLE command to drop the constraint.
- Indexes cannot be undropped.
- When the IF EXISTS clause is specified and the target object doesn’t exist, the command completes successfully without returning an error.