Counter columns and deletion

Just as the INSERT statements are not a useful operation on counter columns, neither are DELETE statements. It is possible to delete a row containing counter columns:

DELETE FROM "daily_status_update_views" WHERE "year" = 2014   AND "date" = '2014-02-01 00:00:00+0000'; 

Upon reading the table, you will notice that the deleted row is missing, just as expected:

Let's try re-adding some data to the row for February 1:

UPDATE "daily_status_update_views" SET "total_views" = "total_views" + 100 WHERE "year" = 2014   AND "date" = '2014-02-01 00:00:00+0000';

On reading the data in the table, we'll see something surprising: ...

Get Learning Apache Cassandra - Second 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.