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.
SyntaxDESCRIBE KEYSPACES
ParametersParameter | Type | Description |
---|---|---|
keyspace_name | text | The name of the keyspace. |
name | text | The name of the schema object. |
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).
SyntaxDESCRIBE KEYSPACE [keyspace_name]
- 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.
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. |
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.
SyntaxDESCRIBE TABLES
ParametersParameter | Type | Description |
---|---|---|
keyspace_name | text | The name of the keyspace. |
name | text | The name of the schema object. |
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.
SyntaxDESCRIBE TABLE [keyspace_name.] table_name
ParametersParameter | 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. |
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.
SyntaxDESCRIBE INDEX [keyspace_name.] index_name
ParametersParameter | 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. |
DESCRIBE INDEX testks.myindex;