P.K.

Cassandra学习笔记(2)

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.Cassandra学习笔记(2)

2.Cassandra学习笔记(2)

Cassandra学习笔记(2)

3.Cassandra学习笔记(2)

相关文章:

  • 2021-11-11
  • 2021-11-04
  • 2021-08-05
  • 2021-04-29
  • 2021-07-04
  • 2021-11-17
  • 2021-04-19
猜你喜欢
  • 2021-12-23
  • 2022-12-23
  • 2021-10-31
  • 2021-04-24
  • 2021-04-16
  • 2021-06-22
  • 2021-12-29
相关资源
相似解决方案