Truncate versus drop

It's important to note that dropping a table is different from truncating it. A drop will remove the table from the schema definition, but the data will remain on-disk. With truncate, the data is removed, but the schema remains. Truncate is also the only way to clear all data from a table in a single command, as a CQL delete requires key parameters.

Get Mastering Apache Cassandra 3.x - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.