DROP INDEX

Drops a secondary index.

See also:

CREATE INDEX , SHOW INDEXES , CREATE HYBRID TABLE , DROP TABLE , DESCRIBE TABLE , SHOW HYBRID TABLES

Syntax

DROP INDEX [ IF EXISTS ] <table_name>.<index_name>
Copy

Parameters

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 used to enforce unique and/or foreign key constraint(s), use the ALTER TABLE command instead.

  • Indexes cannot be undropped.

Examples

Removes the secondary index c_idx on table t0:

DROP INDEX t0.c_idx;
Copy