小编som*_*ngh的帖子

无法更改/更改 cql cassandra 中列的数据类型

CREATE TABLE mykespace.newtable (
    name text PRIMARY KEY,
    marks int,
    score float,
    value float,
    value2 blob
)

cqlsh:mykespace> alter table newtable alter value type int;
InvalidRequest: Error from server: code=2200 [Invalid query] message="Altering of types is not allowed"

cqlsh:mykespace> alter table newtable alter value2 type varint;
InvalidRequest: Error from server: code=2200 [Invalid query] message="Altering of types is not allowed"
Run Code Online (Sandbox Code Playgroud)

无法更改数据类型,甚至无法将 int 更改为 varint 和 float 更改为 int

cql cassandra cqlsh

3
推荐指数
1
解决办法
4242
查看次数

标签 统计

cassandra ×1

cql ×1

cqlsh ×1