The following table lists the data type support for a Vertica database.
The NCHAR and NVARCHAR data types are not supported for data definition.
For data source-specific information about Vertica data types, see the Vertica database documentation.
|
Data Type Definition Keyword 1 |
Vertica SQL Identifier |
Description |
Data Type Returned |
|---|---|---|---|
|
BIGINT |
BIGINT |
A signed 64-bit integer, requiring 8 bytes of storage. |
BIGINT |
|
BINARY(n) |
BINARY(n) |
A fixed-length binary string. |
BINARY(n) |
|
BOOLEAN |
A logical Boolean (true/false) value. |
||
|
BYTEA |
A varying-length binary string. |
||
|
CHAR(n) |
CHAR(n) |
A fixed-length character string. |
CHAR(n) |
|
DATE |
DATE |
A date value. |
DATE |
|
DATETIME |
A date and time value with or without time zone. |
TIMESTAMP(p) |
|
|
DECIMAL|NUMERIC(p,s) |
DECIMAL| NUMERIC(p,s) |
A signed, fixed precision and scale numbers. Default precision and scale: 37, 15. |
DECIMAL|NUMERIC(p,s)3 |
|
DOUBLE |
DOUBLE PRECISION |
A signed 64-bit IEEE floating point number, requiring 8 bytes of storage. |
DOUBLE |
|
FLOAT |
FLOAT, FLOAT8 |
A signed 64-bit IEEE floating point number, requiring 8 bytes of storage. |
DOUBLE |
|
INTEGER |
INTEGER |
A signed 64-bit integer, requiring 8 bytes of storage. |
BIGINT |
|
INTERVAL |
A time span. |
||
|
INTERVAL DAY TO SECOND |
A time span. |
||
|
INTERVAL YEAR TO MONTH |
A time span. |
||
|
LONG VARCHAR |
A varying-length, raw byte value, such as spatial data. |
||
|
LONG BINARY |
A long, varying-length binary string. |
||
|
MONEY(p,s) |
A money or currency value of signed, fixed precision and scale. Default precision and scale: 18, 4. |
||
|
NUMBER(p,s) |
A signed, fixed precision and scale numbers. Default precision and scale: 38,0. |
||
|
RAW |
A varying-length binary string. |
||
|
REAL |
REAL |
A signed 64-bit IEEE floating point number, requiring 8 bytes of storage. |
DOUBLE |
|
SMALLDATETIME |
A date and time value with or without time zone. |
TIMESTAMP(p) |
|
|
SMALLINT |
SMALLINT |
A signed 64-bit integer, requiring 8 bytes of storage. |
BIGINT |
|
TIME(p) |
TIME(p) |
A time value without time zone. |
TIME(p) |
|
TIMETZ |
A time value with time zone. |
TIME(p) |
|
|
TIMESTAMP(p) |
TIMESTAMP |
A date and time value without time zone. |
TIMESTAMP(p) |
|
TIMESTAMPTZ |
A date and time value with time zone. |
TIMESTAMP(p) |
|
|
TINYINT |
TINYINT |
A signed 64-bit integer, requiring 8 bytes of storage. |
BIGINT |
|
VARBINARY(n) |
VARBINARY |
A varying-length binary string. |
VARBINARY(n) |
|
VARCHAR(n) |
VARCHAR(n), TEXT |
A varying-length character string. |
VARCHAR(n) |
| 1 The CT_PRESERVE= connection argument, which controls how data types are mapped, can affect whether a data type can be defined. The values FORCE (default) and FORCE_COL_SIZE do not affect whether a data type can be defined. The values STRICT and SAFE can result in an error if the requested data type is not native to the data source, or the specified precision or scale is not within the data source range. | |||
| 2 The Vertica data type cannot be defined, and when data is retrieved, the native data type is mapped to a similar data type. | |||
| 3 In FedSQL, the DECIMAL data type is supported in requests that can be fully passed down to the data source. DECIMAL columns in requests that cannot be fully passed down to the data source are handled as DOUBLE, which can affect precision. For more information, see Data Types in SAS FedSQL Language Reference. | |||