无法创建带有注释的表

时间:2018-06-28 07:49:17

标签: cassandra-3.0 cqlsh

我试图创建一个表并想在架构中添加注释,但是我无法正确获取语法。

CREATE TABLE codingjedi.practice_questions_javascript_tag(
  year bigint,
  month bigint,
  creation_time_hour bigInt,
  creation_time_minute bigInt,
  id uuid,
  PRIMARY KEY ((year, month), creation_time_hour, creation_time_minute)  
) WITH comment = 'some comment' CLUSTERING ORDER BY (creation_time_hour DESC, creation_time_minute ASC) 

1 个答案:

答案 0 :(得分:0)

我不得不使用AND来结合这两条指令

CREATE TABLE codingjedi.practice_questions_javascript_tag(
  year bigint,
  month bigint,
  creation_time_hour bigInt,
  creation_time_minute bigInt,
  id uuid,
  PRIMARY KEY ((year,month), creation_time_hour, creation_time_minute, id )  
) WITH comment = 'some comment' AND CLUSTERING ORDER BY (creation_time_hour DESC, creation_time_minute ASC, question_id ASC);