Was this helpful?
Storage Formats of Data Types
The following table describes how each data type is stored:
Data Type
Description
Range
char
character
A string of 1 to maximum configured row size but not exceeding 32,000 bytes
c
character
A string of 1 to maximum configured row size but not exceeding 32,000 bytes
varchar
character
A string of 1 to maximum configured row size but not exceeding 32,000 bytes
long varchar
character
A string of 1 to 2 GB characters
text
character
A string of 1 to maximum configured row size but not exceeding 32,000 bytes
nchar
Unicode
A string of 1 to maximum configured row size, but not exceeding 32,000 bytes
nvarchar
Unicode
A string of 1 to maximum configured row size, but not exceeding 32,000 bytes
long nvarchar
Unicode
A string of 1 to a maximum of 1 GB Unicode characters (that is, 2 bytes to a maximum of 2 GB in length)
tinyint
1-byte integer
-128 to +127
smallint
2-byte integer
-32,768 to +32,767
integer
4-byte integer
-2,147,483,648 to +2,147,483,647
bigint
8-byte integer
-9,223,372,036,854,775,808 to +9,223,372,036,854,775,807
decimal
fixed-point exact numeric
Depends on precision and scale. Default is (5,0): ‑99999 to +99999. Maximum number of digits is 39.
float4
4-byte floating
-1.0e+38 to +1.0e+38 (7 digit precision)
float
8-byte floating
-1.0e+38 to +1.0e+38
ansidate
4-byte binary
0001-01-01 to 9999-12-31
time
10-byte binary
00:00:00 to 23:59:59
timestamp
14-byte binary
0001-01-01 00:00:00 to 9999-12-31 23:59:59
interval year to month
3-byte binary
-9999-0 to 9999-11
interval day to second
12-byte binary
-3652047 00:00:00 to 3652047 23:59:59
ingresdate
ingresdate (12 bytes)
1-jan-0001 to 31-dec-9999 (for absolute dates) and -9999 years to +9999 years (for time intervals)
money
money (8 bytes)
$-999,999,999,999.99 to $999,999,999,999.99
table_key
logical key
No range: stored as 8 bytes
object_key
logical key
No range: stored as 16 bytes
ipv4
4-byte binary
0.0.0.0 to 255.255.255.255
ipv6
16-byte binary
:: to ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
byte
binary
Fixed length binary data, 1 to maximum configured row size
byte varying
binary
Variable length binary data, 1 to maximum configured row size
long byte
binary
1 to 2 GB of binary data
uuid
128-bit integer
00000000-0000-0000-0000-000000000000 to FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
boolean
1-byte binary
0 or 1
Nullable columns require one additional byte to store a null indicator.
Note:  If your hardware supports the IEEE standard for floating point numbers, the float type is accurate to 14 decimal precision (-dddddddddddd.dd to +dddddddddddd.dd) and ranges from -10**308 to +10**308. The money type is accurate to 14 decimal precision with or without IEEE support.
Note:  Ingres stores dates in GMT. If an Ingresdate is entered in a local time zone, the date when converted to GMT must be in the range stated above.
Last modified date: 11/28/2023