Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

abhisheksahani192_183401 avatar image
abhisheksahani192_183401 asked ·

ALTER TYPE add multiple fields syntax

Hi can please anyone explain the syntax for adding multiple fields to UDT

I tried following

ALTER TYPE type_e4e8f10ebbad651d5d73db4eafc908cc (add a text,b text);

SyntaxException: line 1:50 no viable alternative at input '(' (ALTER TYPE type_e4e8f10ebbad651d5d73db4eafc908cc [(]...)


ALTER TYPE type_e4e8f10ebbad651d5d73db4eafc908cc add a text,b text;

SyntaxException: line 1:60 mismatched input ',' expecting EOF (... TYPE type_e4e8f10ebbad651d5d73db4eafc908cc add a text[,]b...)

cassandra
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

aholmber avatar image
aholmber answered ·

ALTER TYPE only allows ADDing a single field per DDL statement.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.