Check CQL version with Cassandra and cqlsh?

独自空忆成欢 提交于 2021-02-05 20:47:39

问题


How do you check which cql version is currently being used in cqlsh?

In sql, you do this:

Select @@version

回答1:


There are a couple of ways to go about this.

From within cqlsh, you can simply show version.

aploetz@cqlsh> show version
[cqlsh 5.0.1 | Cassandra 2.1.8 | CQL spec 3.2.0 | Native protocol v3]

However, that only works from within cqlsh. Fortunately, you can also query system.local for that information as well.

aploetz@cqlsh> SELECT cql_version FROM system.local;

 cql_version
-------------
       3.2.0

(1 rows)

The system.local table has other useful bits of information about your current node, cluster, and Cassandra tool versions as well. For more info, check it out with either SELECT * FROM system.local; (only has 1 row) or desc table system.local.



来源:https://stackoverflow.com/questions/31502442/check-cql-version-with-cassandra-and-cqlsh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!