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