April 2017
Beginner to intermediate
360 pages
9h 35m
English
To write data to a tuple column, we provide values for all of the tuple components, in order, separated by commas and grouped by parentheses:
UPDATE "users" SET "education" = ('Big Data University', 2003) WHERE "username" = 'alice';
When we read alice's user record back, cqlsh displays tuple data using the same format:

If we wish to populate some of the components of a tuple but leave others empty, we can use the null keyword:
UPDATE "users" SET "education" = ('Cassandra College', null) WHERE "username" = 'bob';
As a shorthand, we can omit the last value or values when writing a tuple, as long as we specify at least ...
Read now
Unlock full access