Apache Cassandra 1.1 Documentation

TRUNCATE

This document corresponds to an earlier product version. Make sure you are using the version that corresponds to your version.

Latest Cassandra documentation | Earlier Cassandra documentation

Removes all data from a column family.

Synopsis

TRUNCATE [keyspace.]<column_family>;

Description

A TRUNCATE statement results in the immediate, irreversible removal of all data in the named column family.

Example

TRUNCATE user_activity;

CQL Commands

CQL Commands CQL Shell Commands
ALTER TABLE ASSUME
ALTER KEYSPACE CAPTURE
BATCH COPY
CREATE TABLE DESCRIBE
CREATE INDEX EXIT
CREATE KEYSPACE SHOW
DELETE SOURCE
DROP TABLE  
DROP INDEX  
DROP KEYSPACE  
INSERT  
SELECT  
TRUNCATE  
UPDATE  
USE