Data types
The column types. A column definition accepts any of the words in the second column, in any letter case. The third column is the name that SHOW COLUMNS and system.columns report.
| Type | Words in a column definition | Reported name | Description |
|---|---|---|---|
int64 | int64, int, bigint, integer | int64 | Signed 64-bit integer. The words int and integer also mean 64 bits. |
float64 | float64, float, double | float64 | 64-bit floating-point number. |
varchar | varchar, string, text | varchar | Variable-length string of bytes. |
timestamp | timestamp, datetime64 | timestamp | Point in time with nanosecond precision in UTC, stored as signed 64-bit nanoseconds since the Unix epoch. |
array_int64 | array_int64 | array_int64 | Array of Int64 values. |
array_float64 | array_float64 | array_float64 | Array of Float64 values. |
array_varchar | array_varchar | array_varchar | Array of strings. |
UInt8 | UInt8 | UInt8 | Unsigned 8-bit integer. |
UInt16 | UInt16 | UInt16 | Unsigned 16-bit integer. |
UInt32 | UInt32 | UInt32 | Unsigned 32-bit integer. |
UInt64 | UInt64 | UInt64 | Unsigned 64-bit integer. |
Bool | Bool, boolean | Bool | Boolean value, stored as 0 or 1. |
Int8 | Int8, tinyint | Int8 | Signed 8-bit integer. |
Int16 | Int16, smallint | Int16 | Signed 16-bit integer. |
Int32 | Int32 | Int32 | Signed 32-bit integer. |
Float32 | Float32, real | Float32 | 32-bit floating-point number. |
Date | Date | Date | Calendar date, stored as days since the Unix epoch. |
DateTime | DateTime | DateTime | Point in time with second precision in UTC, stored as seconds since the Unix epoch. |
FixedString | FixedString, fixed_string | FixedString | String of exactly N bytes, written FixedString(N). Shorter values are padded with zero bytes and longer values are rejected. |
IPv4 | IPv4 | IPv4 | IPv4 address, stored as an unsigned 32-bit number and written in dotted form. |
Enum8 | Enum8 | Enum8 | Enumeration of named values stored as a signed 8-bit integer, written Enum8('name' = value, ...). |
Enum16 | Enum16 | Enum16 | Enumeration of named values stored as a signed 16-bit integer, written Enum16('name' = value, ...). |
Int128 | Int128 | Int128 | Signed 128-bit integer. |
UInt128 | UInt128 | UInt128 | Unsigned 128-bit integer. |
UUID | UUID | UUID | Universally unique identifier, written as 32 hexadecimal digits in the 8-4-4-4-12 form. |
IPv6 | IPv6 | IPv6 | IPv6 address, stored as 128 bits. |
map_i64_i64 | map_i64_i64 | Map(Int64, Int64) | Map from Int64 keys to Int64 values. |
map_i64_f64 | map_i64_f64 | Map(Int64, Float64) | Map from Int64 keys to Float64 values. |
map_i64_str | map_i64_str | Map(Int64, String) | Map from Int64 keys to string values. |
map_str_i64 | map_str_i64 | Map(String, Int64) | Map from string keys to Int64 values. |
map_str_f64 | map_str_f64 | Map(String, Float64) | Map from string keys to Float64 values. |
map_str_str | map_str_str | Map(String, String) | Map from string keys to string values. |
AggregateFunction | AggregateFunction, agg_state | AggregateFunction | Intermediate state of an aggregate function, written AggregateFunction(name, argument types). |
array_float32 | array_float32 | array_float32 | Array of Float32 values, such as an embedding vector. |
Decimal32 | Decimal32 | Decimal32 | Fixed-point number with up to 9 digits, written Decimal(P, S) with P of at most 9. |
Decimal64 | Decimal64 | Decimal64 | Fixed-point number with up to 18 digits, written Decimal(P, S) with P of at most 18. |