【问题标题】:Cassandar DB : How to display output of describe tables in ascendant or descendant order?Cassandra DB:如何以升序或降序显示描述表的输出?
【发布时间】:2018-09-15 08:12:56
【问题描述】:

我正在尝试执行此 cql 命令以获取 cassandra 中的表列表:

cqlsh:myspace> describe tables;

我得到这样的输出:

site                    vehicle                  vehicle_brand         
vehicle_color           employee                 project  
...
... 

我有很多桌子。

是否可以显示以升序或降序显示的表格列表?

如果是,如何?

【问题讨论】:

    标签: cassandra cql cassandra-3.0 cqlsh


    【解决方案1】:

    您可以通过使用 CQL 查询来查询 system_schema.tables 表,如下所示:

    select table_name from system_schema.tables 
       where keyspace_name = 'myspace' order by table_name desc;
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-12-26
    • 2013-12-07
    • 1970-01-01
    • 1970-01-01
    • 2018-05-23
    • 2018-05-03
    • 1970-01-01
    相关资源
    最近更新 更多