Data Types

String data types

Data TypeDescriptionMaximum Size Limit
CHARACTER(length)Fixed length string, length specifies the number of characters to be stored255
VARCHAR(length)Variable length string,length specifies the number of characters to be stored255
CLOB(length)Variable length string,length specifies the number of characters to be stored2,147,483,647
GRAPHIC(length)Fixed-length graphic strings, length specifies the number of double-byte characters to be stored128
VARGRAPHIC(length)Variable length string,length specifies the number of double-byte characters to be stored16352
DBCLOB(length)Variable length string,length specifies the number of double-byte characters to be stored1,073,741,824
BINARY(length)Fixed-length or variable-length binary strings , length specifies the number of binary characters to be stored255
VARBINARY(length)Variable binary string,length specifies the number of binary characters to be stored32704
BLOB(length)Variable length string, length specifies the number of bytes to be stored2,147,483,647

Data and time data types

Data typeFormatRange
DATE'YYYY-MM-DD'0001-01-01 to 9999-12-31
TIMESTAMP'YYYY-MM-DD-hh.mm.ss.fraction'0001-01-01-00.00.00.000000000 to 9999-12-31-24.00.00.000000000
TIME'hh:mm:ss'00.00.00 to 24.00.00

Numeric data types

Data typeDescription
SMALLINTSmall Integer with range of -32768 to +32767
INTLarge Integer with range of -2147483648 to +2147483647
BIGINTA very large Integer with range of range is -2147483648 to +2147483647
DECIMAL or NUMERICA packed decimal number with range of 1 - 10³¹ to 10³¹ - 1
DECFLOATA decimal floating-point number with range is either 16 or 34 digits of precision
REALThis is a short floating-point number of 32 bits with range approximately -7.2E+75 to 7.2E+75
DOUBLEThis is a long floating-point number of 64 bits with range approximately -7.2E+75 to 7.2E+75

XML Data type

The XML data type is used to define columns of a table can store XML values.
The size of an XML value has no architectural limit but serialized XML data that is stored in or retrieved from an XML column is limited to 2 GB.