DESCRIBE

Updated at:

DESCRIBE returns schema information about keyspaces, tables, and indexes in Lindorm CQL (Cassandra Query Language).

Supported variants

DESCRIBE KEYSPACES
DESCRIBE KEYSPACE [keyspace_name]
DESCRIBE TABLES
DESCRIBE TABLE table_name
DESCRIBE INDEX index_name

DESCRIBE KEYSPACES

Returns the names of all keyspaces.

Syntax

DESCRIBE KEYSPACES

Example

DESCRIBE KEYSPACES;

DESCRIBE KEYSPACE

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

Syntax

DESCRIBE KEYSPACE [keyspace_name]

Parameters

ParameterTypeDescription
keyspace_nametextThe name of the keyspace.
If keyspace_name is omitted, the command returns all schema objects in the current keyspace. If you include the ONLY keyword, only the DDL statement needed to recreate the keyspace is returned — tables and other objects are excluded.

Example

DESCRIBE KEYSPACE testks;

DESCRIBE TABLES

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

Syntax

DESCRIBE TABLES

Example

DESCRIBE TABLES;

DESCRIBE TABLE

Returns the schema of a table as a DDL statement that can be used to recreate it in Lindorm CQL.

Syntax

DESCRIBE TABLE table_name

Parameters

ParameterTypeDescription
table_nametextThe name of the table.

Example

DESCRIBE TABLE persioninfo;

DESCRIBE INDEX

Returns the schema of a table index as a DDL statement that can be used to recreate it in Lindorm CQL.

Syntax

DESCRIBE INDEX index_name

Parameters

ParameterTypeDescription
index_nametextThe index name.

Example

DESCRIBE INDEX testks.myindex;