【问题标题】:CQL3 error: drop table if existsCQL3 错误:删除表(如果存在)
【发布时间】:2014-03-07 19:22:22
【问题描述】:

根据文档:http://cassandra.apache.org/doc/cql3/CQL.html#dropTableStmthttp://www.datastax.com/documentation/cql/3.1/webhelp/index.html#cql/cql_reference/drop_table_r.html

只有当表存在时才可以使用以下语法删除表:

DROP TABLE IF EXISTS keyspace_name.table_name

但是我收到以下错误:

cqlsh:default> DROP TABLE IF EXISTS default.my_table;
Bad Request: line 1:14 no viable alternative at input 'EXISTS'

我正在使用以下版本: [cqlsh 4.1.0 |卡桑德拉 1.2.10 | CQL 规范 3.0.5 | Thrift 协议 19.36.0]

是我遗漏了什么还是文档问题?

【问题讨论】:

    标签: cassandra cql3 cqlsh


    【解决方案1】:

    此功能适用于 cassandra 2.x 及更高版本。查看this blog,它描述了C* 2.0 中cql3 的改进。

    【讨论】:

    猜你喜欢
    • 2014-09-11
    • 2012-07-26
    • 2012-06-06
    • 1970-01-01
    • 2017-12-03
    • 1970-01-01
    • 1970-01-01
    • 2013-12-08
    • 2011-11-07
    相关资源
    最近更新 更多