cassandra 无法创建带有注解的表

siotufzp  于 2022-11-05  发布在  Cassandra
关注(0)|答案(1)|浏览(94)

我正在尝试创建一个表,并希望在架构中添加注解,但无法获得正确的语法。

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)
7rtdyuoh

7rtdyuoh1#

我不得不使用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);

相关问题