Sybase 12.4.2 manual Adaptive Server Enterprise data type equivalents, 218

Models: 12.4.2

1 536
Download 536 pages 20.34 Kb
Page 238
Image 238

Matching Adaptive Server Enterprise data types

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

Adaptive

 

 

Server

 

 

Enterprise

Adaptive Server IQ

 

Datatype

Datatype

Notes

 

 

 

int

INT,BIGINT,UNSIGNED

Adaptive Server IQ does not allow scaled integers, such as

 

INT, UNSIGNED BIGINT,

INT(7,3). Data in the form INT(precision,scale) is converted to

 

or NUMERIC

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

If the precision of the Adaptive Server IQdatatype you define

 

with appropriate precision

is too small to store the Adaptive Server Enterprise value, the

 

 

value converts to NULL.

 

 

 

decimal

DECIMAL or NUMERIC

See above.

 

with appropriate precision

 

 

 

 

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

 

 

 

 

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

 

Adaptive Server IQ

 

 

 

Enterprise Datatype

 

Datatype

Notes

 

 

 

 

float (precision)

 

FLOAT (precision)

IQ supports greater precision for FLOAT

 

 

 

HNG indexes do not allow FLOAT, REAL, or DOUBLE data.

 

 

 

 

218

Page 238
Image 238
Sybase 12.4.2 manual Adaptive Server Enterprise data type equivalents, Matching Adaptive Server Enterprise data types, 218