Dropping a keyspace, table or materialized view

Steps for dropping keyspace, table or materialized view using the DROP command.

You drop a table or keyspace using the DROP command.

Procedure

  • Drop the test keyspace.
    cqlsh> DROP KEYSPACE test;
  • Drop the cycling.last_3_days table.
    cqlsh> DROP TABLE cycling.last_3_days;
  • Drop the cycling.cyclist_by_age materialized view in Cassandra 3.0 and later.
    cqlsh> DROP MATERIALIZED VIEW cycling.cyclist_by_age;