Skip to main content Link Menu Expand (external link) Document Search Copy Copied

INT data type

Int is a numeric datatype used with the min and max constraints.


INT [MIN {<value>}] [MAX {<value>}]


Argument Description Default
INT Used for integer data that spans a large range of values intended for aggregate queries  
MIN Minimum value constraint -2^63
MAX Maximum value constraint 2^63 -1

Additional information

Values are truncated if they fall outside the default or user-specified min and max constraints.

INT is not suitable for queries that

  • group by
  • include data sets with low cardinality

Instead, use the ID data type.


create table doctest
    _id id,
    numbers int min -991 max 991,
    words string
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',
    vectorcol vector(768)
  with comment 'table containing all column types';