CQL for Cassandra 2.x

Keyspace, table, and column information

An alternative to the Thrift API describe_keyspaces function is querying system.schema_keyspaces directly. You can also retrieve information about tables by querying system.schema_columnfamilies and about column metadata by querying system.schema_columns.

Procedure

Query the defined keyspaces using the SELECT statement.
SELECT * from system.schema_keyspaces;
The cqlsh output includes information about defined keyspaces.
 keyspace | durable_writes | name    | strategy_class | strategy_options
----------+----------------+---------+----------------+----------------------------
  history |           True | history | SimpleStrategy | {"replication_factor":"1"}
  ks_info |           True | ks_info | SimpleStrategy | {"replication_factor":"1"}
  
(2 rows)
Show/hide