This topic describes the DESCRIBE syntax and provides examples on how to use the syntax.

DESCRIBE KEYSPACES

Displays the names of all keyspaces.

Syntax
DESCRIBE KEYSPACES 
Examples
DESCRIBE KEYSPACES;

DESCRIBE KEYSPACE

Displays the structure of a keyspace and the status of all schema objects in the keyspace, including tables, user-defined types (UDTs), and user-defined functions (UDFs).

Syntax
DESCRIBE KEYSPACE [keyspace_name]
Note
  • If the keyspace_name parameter is not configured, the status of all schema objects in the current keyspace is returned.
  • If you specify the ONLY keyword, only the DDL statement that is used to recreate the keyspace is returned. All objects in the keyspace, such as tables, are not returned.
Parameters
Parameter Type Description
keyspace_name text The name of the keyspace.
Examples
DESCRIBE KEYSPACE testks;

DESCRIBE TABLES

Displays the names of all tables in a specified keyspace. If the specified keyspace does not exist, the names of all keyspaces are returned.

Syntax
DESCRIBE TABLES
Examples
DESCRIBE TABLES;

DESCRIBE TABLE

Displays the schema status of a table. The status information can be used in a Lindorm CQL statement that is used to recreate the table.

Syntax
DESCRIBE TABLE table_name
Parameters
Parameter Type Description
table_name text The name of the table.
Examples
DESCRIBE TABLE persioninfo;

DESCRIBE INDEX

Displays the schema status of a table index. The status information can be used in a Lindorm CQL statement that is used to recreate a specific index.

Syntax
DESCRIBE INDEX index_name
Parameters
Parameter Type Description
index_name text The index name.
Examples
DESCRIBE INDEX testks.myindex;