This topic describes the DESCRIBE syntax. This topic also provides examples to show how to use the DESCRIBE syntax.

DESCRIBE KEYSPACES

Displays the names of all keyspaces.

Syntax
DESCRIBE KEYSPACES 
Parameters
Parameter Type Description
keyspace_name text The name of the keyspace.
name text The name of the schema object.
Examples
DESCRIBE KEYSPACES;

DESCRIBE KEYSPACE

Displays the structure of a keyspace and the statuses of all schema objects in the keyspace. Schema objects include 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 statuses of all schema objects in the current keyspace are returned.
  • If the keyspace_name parameter is configured, the statuses of all schema objects in the specified keyspace are returned.
Parameters
Parameter Type Description
keyspace_name text The name of the keyspace.
name text The name of the schema object.
create_statement text The Lindorm Cassandra Query Language (CQL) statement that is used to recreate the schema object.
Examples
DESCRIBE KEYSPACE testks;

DESCRIBE TABLES

Displays the names of all tables in a specified keyspace, or displays the names of all keyspaces if the specified keyspace does not exist.

Syntax
DESCRIBE TABLES
Parameters
Parameter Type Description
keyspace_name text The name of the keyspace.
name text The name of the schema object.
Examples
DESCRIBE TABLES

DESCRIBE TABLE

Displays the schema status of a table. The status can be used in a Lindorm CQL statement that recreates the table.

Syntax
DESCRIBE TABLE [keyspace_name.] table_name
Parameters
Parameter Type Description
keyspace_name text The name of the keyspace.
name text The name of the schema object.
create_statement text The Lindorm CQL statement that is used to recreate the schema object.
Examples
DESCRIBE TABLE persioninfo;

DESCRIBE INDEX

Displays the schema status of a table index. The status can be used in a Lindorm CQL statement that recreates the index.

Syntax
DESCRIBE INDEX [keyspace_name.] index_name
Parameters
Parameter Type Description
keyspace_name text The name of the keyspace.
name text The name of the schema object.
create_statement text The Lindorm CQL statement that is used to recreate the schema object.
Examples
DESCRIBE INDEX testks.myindex;