Cassandra Drop Table

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

Cassandra DROP table

DROP TABLE command is used to drop a table.

Syntax:

  1. DROP TABLE    

Example:

Let's take an example to demonstrate how to drop a table. Here, we drop the student table.

Prior table:

Cassandra Drop table 1

After using the following command:

  1. DROP TABLE student;   

Cassandra Drop table 2

The table named "student" is dropped now. You can use DESCRIBE command to verify if the table is deleted or not. Here the student table has been deleted; you will not find it in the column families list.

  1. DESCRIBE COLUMNFAMILIES;   

Output:

Cassandra Drop table 3