INTEGER

A signed 8-byte (64-bit) data type.

A signed 8-byte (64-bit) data type.

Syntax

[ INTEGER | INT | BIGINT | INT8 | SMALLINT | TINYINT ]

Parameters

INT, INTEGER, INT8, SMALLINT, TINYINT, and BIGINT are all synonyms for the same signed 64-bit integer data type. Automatic compression techniques are used to conserve disk space in cases where the full 64 bits are not required.

Notes

  • The range of values is –2^63+1 to 2^63-1.

  • 2^63 = 9,223,372,036,854,775,808 (19 digits).

  • The value –2^63 is reserved to represent NULL.

  • NULL appears first (smallest) in ascending order.

  • Vertica does not have an explicit 4-byte (32-bit integer) or smaller types. Vertica's encoding and compression automatically eliminate the storage overhead of values that fit in less than 64 bits.

Restrictions

  • The JDBC type INTEGER is 4 bytes and is not supported by Vertica. Use BIGINT instead.

  • Vertica does not support the SQL/JDBC types NUMERIC, SMALLINT, or TINYINT.

  • Vertica does not check for overflow (positive or negative) except in the aggregate function SUM(). If you encounter overflow when using SUM, use SUM_FLOAT(), which converts to floating point.

See also

Data Type Coercion Chart