CQL DML: UPDATE statement
Learn the syntax, usage, and best practices for performing DML operations to UPDATE data in Apache Cassandra tables effectively.
We'll cover the following
In this lesson, we will focus on the Data Manipulation Language (DML) UPDATE
operations supported by Apache Cassandra.
The UPDATE
statement
The UPDATE
statement is used to write data in one or more columns of a given row. To identify the row for updation, values for all primary key columns for the table must be specified in the WHERE
clause. Values of primary key columns cannot be updated. Values for one or more non-primary key columns are assigned using the SET
keyword. If the row is non-existent, it is created. Otherwise, it is updated with the data provided. It cannot be known if the UPDATE
statement resulted in an insert or an update.
Get hands-on with 1300+ tech skills courses.