DESCRIBE
Use the DESCRIBE
command to view columns in the specified table, source, or materialized view.
DESCRIBE
is a shortcut for SHOW COLUMNS
.
tip
DESCRIBE
also lists the indexes on a table or materialized view, whereas SHOW COLUMNS
doesn't.
Syntax
DESCRIBE table_name;
Parameters
Parameter or clause | Description |
---|---|
table_name | The table, source, or materialized view whose columns will be listed. |
Example
This statement shows the columns and indexes of the t1
table:
DESCRIBE t1;
Name | Type
-------------+-----------------
col1 | integer
col2 | integer
primary key | col1
idx1 | index(col2) distributed by(col2)