Keyspace, table, and column information

Use CQL to query system_schema tables to view keyspace, table, and column information. The same information is also available using the cqlsh DESCRIBE commands, which is the preferred method. The system_schema table does not show search index or row-level access control settings.

To secure schema data, enable system_keyspaces_filtering. Users can only access schema information of objects for which they have permission to access.


  • Query the defined keyspaces using the SELECT statement.

    SELECT * FROM system_schema.keyspaces;
  • Get the schema information for tables in the cycling keyspace.

    SELECT * FROM system_schema.tables 
      WHERE keyspace_name = 'cycling' AND table_name = 'cyclist_name';

The following results show the record for the cyclist_name table formatted with the cqlsh EXPAND ON option.

  • Get details about a table’s columns from system_schema.columns.

    SELECT * FROM system_schema.columns 
      WHERE keyspace_name = 'cycling' AND table_name = 'cyclist_name';

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000,