我已经创建了表格
创建表testdates2(日期日期主键,文本);
插入testdates2(2018-04,'nov');
我收到此错误
SyntaxException:行1:23在输入'2018'处没有可行的选择(插入testdates2([2018] ...)
格式为yyyy-mm-dd
,这意味着您也必须始终保留一天。这是一个使用您的架构的示例,该示例将在2018年4月1日插入一行。我为ate
列选择了一个随机值。
cqlsh> insert into testdates2 (dates, ate) VALUES ('2018-04-01', 'Soup');
cqlsh> select * from testdates2;
dates | ate
------------+------
2018-04-01 | Soup
(1 rows)