标签:
清空表里的所有数据
Truncate falcon_gps;
TRUNCATE
accepts a single argument for the column family name, and permanently removes all data from said column family.
查询Cassandra某表里一空有多少行记录
select count(*) from falcon_gps;
批量导入数据
BEGIN BATCH USING CONSISTENCY QUORUM AND TTL 8640000 INSERT INTO users (KEY, password, name) VALUES (‘user2‘, ‘ch@ngem3b‘, ‘second user‘) UPDATE users SET password = ‘ps22dhds‘ WHERE KEY = ‘user2‘ INSERT INTO users (KEY, password) VALUES (‘user3‘, ‘ch@ngem3c‘) DELETE name FROM users WHERE key = ‘user2‘ INSERT INTO users (KEY, password, name) VALUES (‘user4‘, ‘ch@ngem3c‘, ‘Andrew‘) APPLY BATCH;
标签:
原文地址:http://www.cnblogs.com/xxdfly/p/5645139.html