Skip to main content

Data Types

Databend is capable of handling both general and semi-structured data types.

General Data Types

Data TypeAliasStorage SizeMin ValueMax Value
BOOLEANBOOL1 byteN/AN/A
TINYINTINT81 byte-128127
SMALLINTINT162 bytes-3276832767
INTINT324 bytes-21474836482147483647
BIGINTINT648 bytes-92233720368547758089223372036854775807
FLOATN/A4 bytes-3.40282347e+383.40282347e+38
DOUBLEN/A8 bytes-1.7976931348623157E+3081.7976931348623157E+308
DECIMALN/A16/32 bytes-10^P / 10^S10^P / 10^S
DATEN/A4 bytes1000-01-019999-12-31
TIMESTAMPN/A8 bytes0001-01-01 00:00:009999-12-31 23:59:59.999999 UTC
VARCHARSTRINGN/AN/AN/A

Nested / Composite Types

Data TypeAliasSampleDescription
ARRAYN/A[1, 2, 3, 4]A collection of values of the same data type, accessed by their index.
TUPLEN/A('2023-02-14','Valentine Day')An ordered collection of values of different data types, accessed by their index.
MAPN/A{"a":1, "b":2, "c":3}A set of key-value pairs where each key is unique and maps to a value.
VARIANTJSON[1,{"a":1,"b":{"c":2}}]Collection of elements of different data types, including ARRAY and OBJECT.
BITMAPN/A0101010101A binary data type used to represent a set of values, where each bit represents the presence or absence of a value.
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today