Supported data types
In this section, we will go through a list of data types that CockroachDB supports. Here is a list of data types and their descriptions:
ARRAY
: Single-dimensional, homogenous array of any non-array data type—for example,{"cockroachdb", "spanner", "yugabytedb"}
.BIT
: String of binary digits.BOOL
: Boolean value.BYTES
: String of binary characters.DATE
: Date.ENUM
: User-defined data type that consists of a list of static values—for example,ENUM
('earth'
,'mars'
,'venus'
).DECIMAL
: Exact, fixed-point number.FLOAT
: A 64-bit, inexact, floating-point number.INET
: Internet Protocol version 4 (IPv4) and version 6 (IPv6) address.INT
: Signed integer.INTERVAL
: Span of time—for example,INTERVAL '5h39m23s'
.JSONB
: JavaScript Object Notation (JSON) data. Here is an example of JSON data:'{ "id...