Saltar al contenido principal
ClickHouse ofrece varios enteros de longitud fija, con signo (Int) o sin signo (UInt), que van desde un byte hasta 32 bytes. Al crear tablas, se pueden establecer parámetros numéricos para números enteros (p. ej., TINYINT(8), SMALLINT(16), INT(32), BIGINT(64)), pero ClickHouse los ignora.

Rangos de enteros

Los tipos enteros tienen estos rangos:
TipoRango
Int8[-128 : 127]
Int16[-32768 : 32767]
Int32[-2147483648 : 2147483647]
Int64[-9223372036854775808 : 9223372036854775807]
Int128[-170141183460469231731687303715884105728 : 170141183460469231731687303715884105727]
Int256[-57896044618658097711785492504343953926634992332820282019728792003956564819968 : 57896044618658097711785492504343953926634992332820282019728792003956564819967]
Los tipos enteros sin signo tienen estos rangos:
TipoRango
UInt8[0 : 255]
UInt16[0 : 65535]
UInt32[0 : 4294967295]
UInt64[0 : 18446744073709551615]
UInt128[0 : 340282366920938463463374607431768211455]
UInt256[0 : 115792089237316195423570985008687907853269984665640564039457584007913129639935]

Alias de tipos enteros

Los tipos enteros tienen los siguientes alias:
TipoAlias
Int8TINYINT, INT1, BYTE, TINYINT SIGNED, INT1 SIGNED
Int16SMALLINT, SMALLINT SIGNED
Int32INT, INTEGER, MEDIUMINT, MEDIUMINT SIGNED, INT SIGNED, INTEGER SIGNED
Int64BIGINT, SIGNED, BIGINT SIGNED, TIME
Los tipos enteros sin signo tienen los siguientes alias:
TipoAlias
UInt8TINYINT UNSIGNED, INT1 UNSIGNED
UInt16SMALLINT UNSIGNED
UInt32MEDIUMINT UNSIGNED, INT UNSIGNED, INTEGER UNSIGNED
UInt64UNSIGNED, BIGINT UNSIGNED, BIT, SET
Última modificación el 10 de junio de 2026