Skip to main content

Databend Data Types

Databend supports SQL data types in several categories:

General-Purpose Data Types

NameStorage SizeMin ValueMax ValueDescription
BOOLEAN1 byteLogical boolean (true/false)
TINYINT1 byte-128127
SMALLINT2 bytes-3276832767
INT4 bytes-21474836482147483647
BIGINT8 bytes-92233720368547758089223372036854775807
FLOAT4 bytes-3.40282347e+383.40282347e+38
DOUBLE8 bytes-1.7976931348623157E+3081.7976931348623157E+308
DATE4 bytes1000-01-019999-12-31YYYY-MM-DD
TIMESTAMP8 bytes0001-01-01 00:00:009999-12-31 23:59:59.999999 UTCYYYY-MM-DD hh:mm:ss[.fraction], up to microseconds (6 digits) precision
VARCHARvariable

Semi-structured Data Types

Databend supports three Semi-structured types: ARRAY, OBJECT and VARIANT.

NameBuild From ValuesDescription
ARRAY[1,2,3]Zero-based indexed list, each value can have difference data type.
OBJECT{"a":1,"b":{"c":2}}Collection of key-value pairs, each key is a VARCHAR, and each value is a VARIANT.
VARIANT[1,{"a":1,"b":{"c":2}}]Collection of elements of different data types., including ARRAY and OBJECT.