Drop Keyspace in Cassandra

Cassandra Drop Keyspace
We can drop keyspaces in Cassandra with all the data, column families, user-defined types and indexes, using the “DROP Keyspace” command. Before dropping the keyspace, a snapshot of the keyspace is taken if the keyspace exists; otherwise, an error will be returned.

Syntax:

DROP  keyspace Keyspace_Name;  

Example:

DROP keyspace durable_example;

Explanation:
The keyspace named “durable_example” will be deleted.

Verification:
Use the “USE” command for the verification of the keyspace deletion.

Syntax:

USE durable_example;