# eXtremeSQL Data Types

The following table defines the eXtremeSQL supported data types and their corresponding eXtremeDB DDL definition. For more detailed information use the link for the data type of interest.

The SQL engine will perform data type conversions transparently for most types. Please see the Data Type Conversion page for further details.

SQL type | eXtremeDB definition | Description
--- | --- | ---
Binary
BINARY(dim) | binary[dim] | Fixed size binary string (byte array) of length `dim` bytes
VARBINARY |  | A variable length binary string (byte array)
BLOB | blob | A binary data object; a byte array of any size, can be greater than 64K in size.
Boolean
BOOLEAN | boolean bits[`dim`]; | A bit value. (Stored internally in a fixed size array of `dim`/8 bytes - 1 byte or 8 bits if no `dim` specified)
Integer
BIT | boolean bits[`dim`]; | A bit value. (Stored internally in a fixed size array of `dim`/8 bytes - 1 byte or 8 bits if no `dim` specified)
TINYINT, INT[EGER](1) | signed<1> | A signed 1-byte integer. Stores values ranging from -128 to 127
SMALLINT, INT[EGER](2) | signed<2> | A signed 2-byte integer. Stores values ranging from -32768 to 32767
INT[EGER](4) | signed<4> | A signed 4-byte integer. Stores values ranging from -2147483648 to 2147483647
BIGINT, LONGINT INT[EGER](8) | signed<8> | A signed 8-byte integer. Stores values ranging from -9223372036854775808 to 9223372036854775807
UNSIGNED[(dim)] | unsigned <dim> | An unsigned integer of dim (1, 2, 4, or 8) bytes.
Floating-Point
FLOAT | float | A 4-byte real number. Stores values ranging from -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38
REAL, DOUBLE | double | An 8-byte real number. Stores values ranging from -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308
DECIMAL[(w,p)] | decimal<w,p> | An 8-byte real number: w = width and p = Precision where p <= w < 20. The actual storage space occupied is determined by the specified width:
Width | Storage Type
--- | ---
1 - 2 | signed<1>
3 - 4 | signed<2>
5 - 9 | signed<4>
10 - 19 | signed<8>
NUMERIC[(w,p)] | numeric<w,p> | A synonym for DECIMAL.
Character
CHAR(n) | char<n> | A fixed length character array (less than 64K bytes in size)
CHAR, VARCHAR, LONGVARCHAR, STRING | string | A variable-length byte array (less than 64K bytes in size)
UNICODE(n) | nchar<n> | A fixed length double-byte array (less than 64K bytes in size)
UNICODE | nstring | A variable-length double-byte array (less than 64K bytes in size)
Date/Time
DATE | datetime | A 8-byte unsigned integer. Though it can be used to store date values in any user-defined format, typically it is used to store the value used in most C/C++ time functions which treat the integer value as the number of seconds since 1 Jan 1970 (Epoch).
TIME | datetime | A 8-byte unsigned integer. (See comment for the `DATE` type above.)
TIMESTAMP | datetime | A 8-byte unsigned integer. (See comment for the `DATE` type above.)