Adaptive Server provides the following exact numeric datatypes to store integers: bigint, int (or integer), smallint, tinyint and each of their unsigned counterparts. Choose the integer type based on the expected size of the numbers to be stored. Internal storage size varies by type, as shown in Table 1-6.
Enter integer data as a string of digits without commas. Integer data can include a decimal point as long as all digits to the right of the decimal point are zeros. The smallint, integer, and bigint datatypes can be preceded by an optional plus or minus sign. The tinyint datatype can be preceded by an optional plus sign.
Table 1-7 shows some valid entries for a column with a datatype of integer and indicates how isql displays these values:
Value entered |
Value displayed |
---|---|
2 |
2 |
+2 |
2 |
-2 |
-2 |
2. |
2 |
2.000 |
2 |
Table 1-8 lists some invalid entries for an integer column:
Value entered |
Type of error |
---|---|
2,000 |
Commas not allowed. |
2- |
Minus sign should precede digits. |
3.45 |
Digits to the right of the decimal point are nonzero digits. |
Copyright © 2005. Sybase Inc. All rights reserved. |