Deleting all rows from Cassandra cql table [duplicate]

To remove all rows from a CQL Table, you can use the TRUNCATE command:

TRUNCATE keyspace_name.table_name;

Or if you are already using the keyspace that contains your target table:

TRUNCATE table_name;

Important to note, but by default Cassandra creates a snapshot of the table just prior to TRUNCATE. Be sure to clean up old snapshots, or set auto_snapshot: false in your cassandra.yaml.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)