Unable to create a table with comment

半世苍凉 提交于 2019-12-11 23:19:42

问题


I am trying to create a table and want to add a comment in the schema but I am not able to get the syntax correct.

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:


I had to use AND to combine the two instruction

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


来源:https://stackoverflow.com/questions/51077477/unable-to-create-a-table-with-comment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!