Dropping a 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.
    DROP KEYSPACE test;
  • Drop the cycling.last_3_days table.
    DROP TABLE cycling.last_3_days;
  • Drop the cycling.cyclist_by_age materialized view in DataStax Enterprise 5.0 and later.
    DROP MATERIALIZED VIEW cycling.cyclist_by_age;