INT data type
Int is a numeric datatype used with the min
and max
constraints.
DDL Syntax
INT [MIN {value}] [MAX {value}]
Arguments
Argument | Description |
---|---|
INT | Used for integer data that spans a large range of values intended for aggregate queries |
MIN | Minimum value constraint defaults to -2^63 |
MAX | Maximum value constraint defaults to 2^63 -1 |
Additional information
INT is not suitable for queries that
- group by
- include data sets with low cardinality
Instead, use the ID data type.
Examples
CREATE TABLE with all data types
create table allcoltypes
(
_id id,
intcol int min 0 max 10000,
boolcol bool,
timestampcol timestamp timeunit 'ms',
decimalcol decimal(2),
stringcol string,
stringsetcol stringset,
stringsetcolq stringsetq timequantum 'YMD' ttl '24h',
idcol id,
idsetcol idset,
idsetcolq idsetq timequantum 'YMD' ttl '24h'
)
comment 'table containing all column types';