3vlM33pl3
3vlM33pl3

Reputation: 547

What is the Cassandra CQL equivalent for INCR (increment a CounterColumn)?

What is the CQL equivalent for this: INCR MyCounter['123']['test'] BY 1

Upvotes: 4

Views: 1083

Answers (1)

psanford
psanford

Reputation: 5670

You can find the CQL syntax reference here: Cassandra Query Language (CQL) v2.0. To increment a counter in CQL:

update MyCounter set test = test + 1 where KEY = '123';

Upvotes: 6

Related Questions