1
votes

How to update a single value in a Set Data type in Cassandra. For example below is my set values in Cassandra. Let say the column name is column1 and value is

{'418_3', '521_4', '523_6'}

I want to update the value '523_6' to '523_4' so the updated value in Cassandra will be

{'418_3', '521_4', '523_4'}
1

1 Answers

2
votes

Update table set column1=column1-{'523_6'},cloumn1=column1+{'523_4'} where id='Your Id'

The above query will remove the value from set and add another.