Adaptive Server provides datatypes bigint, int, smallint, tinyint, unsigned bigint, unsigned int, and unsigned smallint to store integers (whole numbers). These types are exact numeric types; they preserve their accuracy during arithmetic operations.
Choose among the integer types based on the expected size of the numbers to be stored. Internal storage size varies by datatype.
Implicit conversion from any integer type to a different integer type is supported only if the value is within the range of the type being converted to.
Unsigned integer datatypes allow you to extend the range of the positive numbers for the existing integer types without increasing the required storage size. That is, the signed versions of these datatypes extend both in the negative direction and the positive direction (for example, from -32 to +32). However, the unsigned versions extend only in the positive direction. Table 6-2 describes the range of the signed and unsigned versions of these datatypes.
Copyright © 2005. Sybase Inc. All rights reserved. |