pinkpanther
pinkpanther

Reputation: 4808

How to define secondary key while table creation?

I was trying to create a secondary index in cassandra using cql3. I know I can do it using CREATE INDEX.. syntax.

But is there any way I can designate a column as Secondary key when using CREATE TABLE.. syntax i.e., while defining a table?

I have searched on internet but getting results regarding CREATE INDEX. I'm not sure how to frame it.

Upvotes: 0

Views: 43

Answers (1)

ashic
ashic

Reputation: 6495

Nope. You have to do two queries. You can do them one after the other.

Upvotes: 1

Related Questions