Was this helpful?
Data Types
Data Types in SQL, OpenSQL, and QUEL
The following table gives equivalents for SQL, OpenSQL, and QUEL data types:
SQL
OpenSQL
QUEL
Description
c(n)
not used
c(n)
A fixed‑length string of up to n printable ASCII characters, with nonprintable characters converted to blank; n represents the lesser of the maximum configured row size and 32,000.
char(n)
char(n)
char(n)
A fixed‑length string of up to n ASCII characters, including any nonprintable characters; n represents the lesser of the maximum configured row size and 32,000.
varchar(n)
varchar(n)
varchar(n)
A variable‑length string of up to n ASCII characters; n represents the lesser of the maximum configured row size and 32,000.
text(n)
not used
text(n)
A string of up to n ASCII characters (excluding nonprintable characters); n represents the lesser of the maximum configured row size and 32,000.
float4
not used
f4
4‑byte floating point; for numbers including decimal fractions, from 0.29x10**
‑38 to 1.7x10**38
(7 digit precision).
float8
float
f8
8-byte floating point; for numbers including decimal fractions, from 0.29x10**‑38 to 1.7x10**38 (16 digit precision).
decimal
decimal
not used
Exact numeric data type defined by its precision (total number of digits) and scale (number of digits to the right of the decimal point). Precision must be between 1 and 31. Scale can be 0 up to the maximum scale.
integer1
not used
i1
1-byte integer; for whole numbers ranging from
‑128 to +127.
integer2 or
smallint
smallint
i2
2‑byte integer; for whole numbers ranging from
‑32,768 to +32,767.
integer4 or
integer
integer
i4
4‑byte integer; for whole numbers ranging from
‑2,147,483,648 to +2,147,483,647.
money
not used
money
8 byte monetary data from ‑999999999999.99 to +999999999999.99.
date
not used
date
12 bytes; dates ranging from 1‑jan‑1582 to 31‑dec‑2382 for absolute dates and ‑800 years to 800 years for time intervals.
An SQL user‑defined data type (UDT) is perceived and treated as a character string. User-defined data types are not supported in OpenSQL or QUEL.
Some forms utilities do not support the long varchar, byte, byte varying, and long byte data types. For more information, see the documentation for each specific product for details about long varchar, byte, byte varying, and long byte data types.
Last modified date: 08/14/2024