Data Types

This section explains the data types and aliases supported by Exasol.

Besides the standard ANSIClosed American National Standards Institute SQL data types, some additional data types are implemented that ensure compatibility with other databases. You can use the TYPEOF function to determine the data type for a specified expression.

Overview of Exasol Data Types

The following table provides an overview of the defined data types in Exasol.

Exasol Type (ANSI type) Note
BOOLEAN

 

CHAR(n)

1 ≤ n ≤ 2,000

DATE

 

DECIMAL (p,s)

s ≤ p ≤ 36

p ≥ 1; s ≥ 0

DOUBLE PRECISION

 

GEOMETRY[(srid)]

srid defines the coordinate system. For more information, see EXA_SPATIAL_REF_SYS.

INTERVAL DAY [(p)] TO SECOND [(fp)]

1 ≤ p ≤ 9, 0 ≤ fp ≤ 9, accuracy precise to a millisecond

INTERVAL YEAR [(p)] TO MONTH

1 ≤ p ≤ 9

TIMESTAMP

Timestamp with accuracy precise to a millisecond

TIMESTAMP WITH LOCAL TIME ZONE

Timestamp that considers the session time zone

VARCHAR(n)

1 ≤ n ≤ 2,000,000

HASHTYPE[(n BYTE | m BIT)]

1 ≤ n ≤ 1024 BYTE
8 ≤ m ≤ 8192 BIT

When specifying the size in bits, the number of bits m must always be a multiple of 8.

You can find further details about data types in the below pages: