Update operators for tables

Use update operators to update rows in a table. You can use update operators on all supported types.

For examples, see the references for commands that use these operators, such as Update a row.

Name Purpose

$set

Sets a given column’s value to the specified value. For examples, see Update multiple columns.

To update a value to a map that includes non-string keys, you must use an array of key-value pairs to update the map column. Otherwise, you can use an array of key-value pairs or a normal map. For examples, Update a map column.

$unset

Sets a given column’s value to null or the equivalent empty form, such as [] or {} for map, list, and set types.

For examples, see Update multiple columns and Unset columns.

$push

Appends a single element to a map, list, or set.

Use $push with $each to append multiple elements.

$each

Modifies the $push operator to append multiple items to a map, list, or set.

$pullAll

Removes the specified elements from a list or set, or removes entries that match the specified keys from a map.

$rename isn’t supported. Instead, use alterTable to add and drop columns.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax, an IBM Company | Privacy policy | Terms of use | Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com