DROP INDEX
Synopsis
The DROP INDEX
statement removes an index and all of its data from the database.
Syntax
Diagram
Grammar
drop_index ::= DROP INDEX [ IF EXISTS ] index_name;
Where
index_name
is an identifier (possibly qualified with a keyspace name).
Semantics
- An error is raised if the specified
index_name
does not exist unlessIF EXISTS
option is present. - Associated objects to
index_name
such as prepared statements will be eventually invalidated after the drop statement is completed.
Examples
cqlsh:example> CREATE TABLE users(id INT PRIMARY KEY, name TEXT) WITH transactions = { 'enabled' : true };
cqlsh:example> CREATE INDEX users_by_name ON users(name);
cqlsh:example> DROP INDEX users_by_name;
See also
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .