April 2017
Beginner to intermediate
360 pages
9h 35m
English
In our status update application, we'll want to allow direct linking to status updates, in which case we'll need to be able to retrieve a specific status update from the table. So far, we've issued an open-ended SELECT statement to see all the rows we've inserted in user_status_updates, but we haven't seen how to return one particular row.
Since the user_status_updates table has a compound primary key, we need new CQL syntax to allow us to specify values for multiple columns in order to form a unique identifier. CQL provides the AND construct for this purpose:
SELECT * FROM "user_status_updates" WHERE "username" = 'alice' AND "id" = 76e7a4d0-e796-11e3-90ce-5f98e903bf02;
By specifying both the username ...
Read now
Unlock full access