Reference Guide > TDV SQL Support > Data Types > Summary of Data Types that TDV Supports
 
Summary of Data Types that TDV Supports
The following table discusses special considerations when using data types with TDV. Where more detailed discussion is required, separate sections are cross-referenced from the Special Notes column of the table.
Data Types
Variants Supported
Special Notes
BINARY
BINARY, VARBINARY
Behaves in a manner similar to STRING, but it is right-padded with zeroes rather than spaces.
Minimum length is 1.
Maximum length is 255.
BINARY or VARBINARY with length >255 is a BLOB.
BIT
 
 
BLOB
BLOB
You can project (SELECT) BLOB columns.
You can use BLOB only in the CAST function.
BOOLEAN
DATETIME
For more information, see BOOLEAN.
CLOB
CLOB
You can project (SELECT) CLOB columns.
You can use CLOB only in the CAST function.
DATE
DATETIME
Month, day, year.
DECIMAL
DECIMAL, NUMERIC
Maximum precision is 23.
An error is thrown if the number of digits to the left of the decimal point exceeds the precision specified for the type. For example, 12345.00 exceeds the limits of DECIMAL(4,2) and so throws an error.
Minimum scale is -308; maximum scale is 308.
Its scale (the digits to the right of the decimal point) is rounded if necessary to match the scale of the type designation. For example, 1.425 is rounded to 1.43 for DECIMAL(4,2).
DECIMAL and NUMERIC data types are zero-padded on the right if the number of digits to the right of the decimal point is smaller than the scale of the type designation. For example, 1.425 becomes 1.42500 for DECIMAL(4,5).
DOUBLE
 
 
FLOAT
 
 
INTEGER
TINYINT, SMALLINT, INTEGER, BIGINT
A runtime error is thrown if a value is out of the valid range for the integer type.
INTERVAL DAY
 
Represents a duration of time.
Intervals can be positive or negative.
Not directly compatible with INTERVAL MONTH and INTERVAL YEAR.
Can be used in arithmetic operations (addition, subtraction, division, and multiplication), and functions such as ABS, CAST, and EXTRACT.
For more information, see INTERVAL DAY.
INTERVAL MONTH
 
Represents a duration of time.
Can be positive or negative.
Not directly compatible with INTERVAL DAY and INTERVAL YEAR.
Can be used in arithmetic operations (addition, subtraction, division, and multiplication), and functions such as ABS, CAST, and EXTRACT.
INTERVAL YEAR
 
Represents a duration of time.
Intervals can be positive or negative.
Not directly compatible with INTERVAL DAY and INTERVAL MONTH.
Can be used in arithmetic operations (addition, subtraction, division, and multiplication), and functions such as ABS, CAST, and EXTRACT.
For more information, see INTERVAL YEAR.
LONGVARCHAR
 
 
REAL
 
 
STRING
CHAR, VARCHAR
Minimum length is 1.
If a CHAR is less than minimum length, it is right-padded with spaces.
Maximum length is 255.
CHAR or VARCHAR with length >255 is a CLOB.
Operations might pad a CHAR, even if it was not padded originally. So CONCAT (char10, char10) might return "A         B         " instead of "AB" as the result.
TIME
TIMESTAMP
Hours, minutes, seconds.
TIMESTAMP
 
Month, day, year and hours, minutes, seconds.
Depending on formatting, may contain fractional seconds.
XML
 
TDV support for the XML data type complies with the ANSI INCIT/ISO/IEC 9075 part 14 XML-related specifications.
For more information, see XML.