Pankaj Goyal
Pankaj Goyal

Reputation: 1548

How to add multiple columns in cassandra table?

I need to add some new columns to my existing column_family/table in cassandra. I can add single column like this :

ALTER TABLE keyspace_name.table_name ADD column_name cql_type;

Can I add all new columns using a single query? If yes, how to do it using cql and datastax cassandra driver?

Upvotes: 13

Views: 13341

Answers (1)

Lucas B
Lucas B

Reputation: 12013

This is fixed in Cassandra 3.6 https://issues.apache.org/jira/browse/CASSANDRA-10411

ALTER TABLE foo ADD (colname1 int, colname2 int)

Upvotes: 24

Related Questions