How to define secondary key while table creation?

51 Views Asked by At

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.

1

There are 1 best solutions below

0
On BEST ANSWER

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