docs/sql/statements/describe.md
The DESCRIBE statement shows the schema of a table or the execution plan of a query.
Shows the schema (column names and data types) of a table.
DESCRIBE [TABLE] <table_name>
| Parameter | Description |
|---|---|
<table_name> | Name of the table to describe. Can include catalog and namespace. |
Describe the schema of table T.
DESCRIBE T;
Describe the schema with the optional TABLE keyword.
DESCRIBE TABLE T;
Describe a table in a specific catalog and namespace.
DESCRIBE my_catalog.my_namespace.my_table;
Returns a DataFrame with columns:
| Column | Description |
|---|---|
column_name | Name of the column |
type | Data type of the column |
Shows the query execution plan for a SELECT statement.
DESCRIBE <select_statement>
| Parameter | Description |
|---|---|
<select_statement> | The SELECT statement to describe. |
Describe the execution plan for a simple query.
DESCRIBE SELECT * FROM T;
Describe the execution plan for a query with joins.
DESCRIBE SELECT a.*, b.name FROM T a JOIN S b ON a.id = b.id;
!!! warning "Work in Progress"
The SQL Reference documents are a work in progress.