P.K.
cassandra-cli的基本操作
查看幫助文檔
help;
查看所有的鍵空間
show keyspaces;
創建鍵空間
create keyspace testkeyspace;
進入創建好的名爲root的鍵空間
use testkeyspace;
創建列族users並指定UTF8排序屬性
create column family users with comparator = UTF8Type;
插入數據
set users[utf8('zhangsan')][utf8('address')][utf8('company')]=utf8('shanghai');
獲取相應列的數據
get users[utf8('zhangsan')]
設置超級列
create column family users with comparator = UTF8Type and column_type=Super
CQL數據定義語句
1.
2.
3.