Matching Adaptive Server Enterprise data types
218
Adaptive Server Enterprise data type equivalents
The table below indicates the Adaptive Server Enterprise exact numeric types
and the Adaptive Server IQ equivalents.
Table 5-11: Integer data types
The following table indicates the Adaptive Server Enterprise approximate data
types and the Adaptive Server IQ equivalents.
Table 5-12: Approximate numeric data types
Adaptive
Server
Enterprise
Datatype
Adaptive Server IQ
Datatype Notes
int INT,BIGINT,UNSIGNED
INT
, UNSIGNED BIGINT,
or
NUMERIC
Adaptive Server IQ does not allow scaled integers, such as
INT(7,3). Data in the form INT(precision,scale) is converted to
NUMERIC(precision,scale). This differs from Adaptive Server
IQ versions prior to 12.0, and from Adaptive Server Enterprise,
in which int datatypes can be values between -2,147,483,648
and 2,147,483,647, inclusive.
To handle larger integer values, you can use a
BIGINT, an
unsigned integer (
UNSIGNED INT), or an UNSIGNED BIGINT
datatype. With
UNSIGNED INT, the last bit is used as part of the
value. There is no positive or negative indication; all numbers
are assumed to be positive, so the value can go up to
4,294,967,295.
numeric DECIMAL or NUMERIC
with appropriate precision
If the precision of the Adaptive Server IQdatatype you define
is too small to store the Adaptive Server Enterprise value, the
value converts to NULL.
decimal DECIMAL or NUMERIC
with appropriate precision
See above.
smallint SMALLINT or NUMERIC Adaptive Server IQ SMALLINTdoes not allow precision and
scale. Adaptive Server Enterprise
smallint(precision,scale) is
converted to
NUMERIC(precision,scale)See INT above.
tinyint TINYINT Adaptive Server IQ TINYINT columns do not allow precision
and scale. Adaptive Server Enterprise
tinyint(precision,scale) is
converted to
NUMERIC(precision,scale). See INT above.
bit BIT
Adaptive Server
Enterprise Datatype
Adaptive Server IQ
Datatype Notes
float (precision) FLOAT (precision) IQ supports greater precision for FLOAT
HNG
indexes do not allow FLOAT, REAL, or DOUBLE data.