This topic describes the DESCRIBE syntax and provides examples on how to use the syntax.
DESCRIBE KEYSPACES
Displays the names of all keyspaces.
SyntaxDESCRIBE KEYSPACES
ExamplesDESCRIBE 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).
SyntaxDESCRIBE KEYSPACE [keyspace_name]
- 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.
Parameter | Type | Description |
---|---|---|
keyspace_name | text | The name of the keyspace. |
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.
SyntaxDESCRIBE TABLES
ExamplesDESCRIBE 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.
SyntaxDESCRIBE TABLE table_name
ParametersParameter | Type | Description |
---|---|---|
table_name | text | The name of the table. |
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.
SyntaxDESCRIBE INDEX index_name
ParametersParameter | Type | Description |
---|---|---|
index_name | text | The index name. |
DESCRIBE INDEX testks.myindex;