【发布时间】:2015-01-20 10:32:27
【问题描述】:
这是我的表结构,我正在使用以下查询更新序列:
Update styles set sequence=1 where styleid = 'CLASSIC';
我收到错误消息
PRIMARY KEY part sequence found in SET part
Missing PRIMARY KEY part sequence
CREATE TABLE styles (
styleid ascii,
sequence int,
active boolean,
image ascii,
name ascii,
PRIMARY KEY (styleid, sequence)
) WITH CLUSTERING ORDER BY (sequence DESC);
请任何人帮助我更新集群键序列,以便更新。或者任何替代方法请分享。
【问题讨论】:
-
你能发布你的表架构吗?
-
创建表格样式(styleid ascii、sequence int、active boolean、image ascii、name ascii、PRIMARY KEY(styleid、sequence))和聚类顺序(序列DESC)和bloom_filter_fp_chance=0.010000和缓存= 'KEYS_ONLY' AND comment='' AND dclocal_read_repair_chance=0.100000 AND gc_grace_seconds=864000 AND read_repair_chance=0.000000 AND replicate_on_write='true' AND populate_io_cache_on_flush='false' AND compaction={'class': 'SizeTieredCompactionStrategy'} AND compression={'sstable_compression ': 'LZ4Compressor'};
-
我编辑了这个问题以删除
sql标签,并将其替换为cql标签。这是一个重要的区别,因为 sql != cql。 cql 是 sql 的 子集。期望 cql 像 sql 一样运行是一种练习,最终会让你感到沮丧。