Yang, Tong 6182f91ba8 MRS component operation guide_normal 2.0.38.SP20 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-12-09 14:55:21 +00:00

2.0 KiB

DESC: Querying a Table Structure

This section describes the basic syntax and usage of the SQL statement for querying a table structure in ClickHouse.

Basic Syntax

DESC|DESCRIBE TABLE [database_name.]table [INTO OUTFILE filename] [FORMAT format]

Example

-- Query the t1 table structure.
desc t1;
┌─name────┬─type─┬─default_type─┬─default_expression ┬─comment─┬─codec_expression─┬─ttl_expression─┐
│  id          │ UInt8  │                │                     │           │                    │                  │  
│  name        │ UInt8  │                │                     │           │                    │                  │ 
│  address     │ String │                │                     │           │                    │                  │
└───────┴────┴────────┴────────── ┴───── ┴──────────┴─────────┘