Database Reference
In-Depth Information
UPDATE "users"
SET "email" = 'alice@gmail.com',
"encrypted_password" =
0x8914977ed729792e403da53024c6069a9158b8c4
WHERE "username" = 'alice';
In both cases, the query simply instructs Cassandra to set the email and encryp-
ted_password columns to the given values in the row whose primary key is alice .
INSERT and UPDATE are not entirely redundant; however, each provides certain capabil-
ities that the other does not. For instance, only INSERT supports the IF NOT EXISTS
clause that we explored earlier. UPDATE queries also have distinctive functionality, not
the least of which is conditional updates.
Search WWH ::




Custom Search