DROP INDEX

删除二级索引。

See also:

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

语法

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

参数

table_name

指定表的标识符。

index_name

指定索引的标识符。

使用说明

  • 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.
  • 无法取消删除索引。
  • When the IF EXISTS clause is specified and the target object doesn’t exist, the command completes successfully without returning an error.

示例

Removes the secondary index c_idx on table t0:

DROP INDEX t0.c_idx;