ALLBASE/SQL Reference Manual (36216-90216)

Chapter 7 209
Data Types
Type Specifications
FLOAT(
p
) or REAL Short (32-bit) floating point number. This is an
approximate numeric value consisting of an exponent and
a mantissa. The precision,
p
, is a positive integer that
specifies the number of significant binary digits in the
mantissa. The value of
p
can be from 1 to 24. The default
(using REAL) is 24. The range of negative numbers that
can be represented is 3.402823E+38 to 1.175495E38.
The range of positive numbers that can be represented is
3.402823E+38 to 1.175495E38.
REAL is a synonym for FLOAT (24).
INT[EGER]
Integer in the range −2147483648 (−2
31
) το 2147483647
(2
31
−1). INT is a synonym for INTEGER.
SMALLINT
Integer in the range −32768 (−2
15
) το 32767 (2
15
−1).
Date/Time DATE String of form 'YYYY-MM-DD', where YYYY represents the
calendar year, MM is the month, and DD is the day of the
month. DATE is in the range from '0000-01-01' to
'9999-12-31'.
TIME String of the form 'HH:MI:SS: where HH represents hours,
MI is minutes, and SS is seconds. TIME is in the range
from '00:00:00' to '23:59:59'.
DATETIME String of the form 'YYYY-MM-DD HH:MI:SS.FFF', where
YYYY represents the calendar year, MM is the month, DD
is the day, HH the hour, MI the minute, SS the second, and
FFF thousandths of a second. The range is from '000-01-01
00:00:00.000' to '9999-12-31 23:59:59.999'.
INTERVAL String of the form 'DDDDDDD HH:MI:SS.FFF', where
DDDDDDD is a number ofdays, HH a number of hours, MI
a number of minutes, SS a number of seconds, and FFF a
number of thousandths of a second. The range is from '0
00:00:00.000' to '3652436 23:59:59.999'.
Binary BINARY(
n
) Binary string of fixed length
n
, where
n
is an integer from 1
to 3996 bytes. Each byte stores 2 hexadecimal digits.
VARBINARY(
n
) Binary string of variable length no greater than
n
, where
n
is an integer from 1 to 3996 bytes. Each byte stores 2
hexadecimal digits.
LONG BINARY(
n
) Binary string of fixed length
n
, where
n
is an integer from 1
to (2
31
−1) bytes.
LONG
VARBINARY(
n
)
Binary string of variable length no greater than
n
, where
n
is an integer from 1 to (2
31
−1) bytes.
Table 7-1. ALLBASE/SQL Data Types
Group Data Type Description