Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

Cassandra Drop Index

Cassandra Drop Index for beginners and professionals with topics on architecture, relational vs no sql database, data model, cql, cqlsh, keyspace operations, table operations, installation, collections etc.

<< Back to CASSANDRA

Cassandra DROP Index

DROP INDEX command is used to drop a specified index. If the index name was not specified during index creation, then index name is TableName_ColumnName_idx.


DROP INDEX <identifier>


Drop index IF EXISTS KeyspaceName.IndexName 

Rules for dropping an Index

  • If the index does not exist, it will return an error unless you use IF EXISTS which returns no operation.
  • During index creation, you have to specify keyspace name with the index name otherwise index will be dropped from the current keyspace.


Let's take an example to demonstrate how to drop index on a column. Here we drop the created index to a column "student_name" in the table "student". The name of the keyspace is "TheDeveloperBlog".

Drop index IF EXISTS TheDeveloperBlog.student_name 
Cassandra Drop index 1

Index is dropped from the column "student_name".

Note: You can verify that the index is dropped or not, by using the DROP index command once again. It will show a message that index is already dropped.

Cassandra Drop index 2

You can see that index is not anymore on the table.

Next TopicCassandra batch

Related Links:

Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf