April 2017
Beginner to intermediate
360 pages
9h 35m
English
Although Cassandra doesn't have real NULL columns, CQL does provide some syntactic sugar to provide a more familiar interface to remove data from columns. You can, in fact, write UPDATE statements that set values to null:
UPDATE "users" SET "location" = NULL WHERE "username" = 'alice';
Note that this is purely syntactic sugar; the preceding statement is precisely the same operation as the following one:
DELETE "location" FROM "users" WHERE "username" = 'alice';
The DELETE form of the statement is more expressive of what we are actually doing—removing a value from a column—but the UPDATE form is more familiar to anyone used to working with SQL. Another advantage of the UPDATE statement is that we can write ...
Read now
Unlock full access