Updated on 2026-06-27 GMT+08:00

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

For example, to query the table structure of table t1, run the following command:

desc t1;

┌─name────┬─type─┬─default_type─┬─default_expression ┬─comment─┬─codec_expression─┬─ttl_expression─┐
│  id          │ UInt8  │                │                     │           │                    │                  │  
│  name        │ UInt8  │                │                     │           │                    │                  │ 
│  address     │ String │                │                     │           │                    │                  │
└───────┴────┴────────┴────────── ┴───── ┴──────────┴─────────┘