ClickHouse/docs/en/sql-reference/statements/describe-table.md

21 lines
771 B
Markdown
Raw Normal View History

2020-07-11 11:05:49 +00:00
---
toc_priority: 42
2020-07-23 20:02:18 +00:00
toc_title: DESCRIBE
2020-07-11 11:05:49 +00:00
---
# DESCRIBE TABLE Statement {#misc-describe-table}
``` sql
DESC|DESCRIBE TABLE [db.]table [INTO OUTFILE filename] [FORMAT format]
```
Returns the following `String` type columns:
- `name` — Column name.
- `type`— Column type.
- `default_type` — Clause that is used in [default expression](../../sql-reference/statements/create/table.md#create-default-values) (`DEFAULT`, `MATERIALIZED` or `ALIAS`). Column contains an empty string, if the default expression isnt specified.
- `default_expression` — Value specified in the `DEFAULT` clause.
- `comment_expression` — Comment text.
Nested data structures are output in “expanded” format. Each column is shown separately, with the name after a dot.