Hi guys,
I am stucked with the primary key definition.
So far, I've seen definition like this:
CREATE TABLE countries ( country text, total_pop int STATIC, state text, state_pop int, PRIMARY KEY ((country), state) );
and this way I understand that country is the partition key and state is the clustering key.
But I've seen an example like this:
CREATE TABLE countries ( country text, total_pop int STATIC, state text, state_pop int, PRIMARY KEY (country, state) );
And when I print description of this table, it says:
CREATE TABLE killr_video.countries ( country text, state text, total_pop int static, state_pop int, PRIMARY KEY (country, state) ) WITH CLUSTERING ORDER BY (state ASC)
state is the clustering key. How can I figure it out with this type of definition which column is which?
Can anyone explain it to me?