Drop Keyspace in Cassandra - Cassandra / CQL Tutorial

How to drop Keyspace in Cassandra by using CQL

Dropping Keyspace in Cassandra is very easy and straight forward. You will be using "Drop keyspace Keyspace_Name" statement on CQL Shell.

Syntax

CQLSH>DROP keyspace keyspace_name;

I can get the list of all Keyspaces by using "Select * From system_schema.keyspaces". Once I get the right name, we can use Drop keyspace statement in Cassandra to drop keyspace. Let's say my keyspace name is "TechBrothersTutorial", I will be using below script.

CQLSH:techbrotherstutorials>DROP keyspace techbrotherstutorials;