Numeric data types
Numeric data types
Function
Notes
Compatibility
BIGINT data type [Numeric]
Function
Syntax
268
For storing numerical data.
♦
The NUMERIC and DECIMAL data types, and the various kinds of
INTEGER data types, are sometimes called exact numeric data types, in
contrast to the approximate numeric data types FLOAT, DOUBLE, and
REAL.
The exact numeric data types are those for which precision and scale
values can be specified, while approximate numeric data types are stored
in a predefined manner. Only exact numeric data is guaranteed accurate
to the least significant digit specified after an arithmetic operation.
♦
Before release 5.5, hexadecimal constants longer than four bytes were
treated as string constants, and others were treated as integers. The new
default behavior is to treat them as binary type constants. To use the
historical behavior, set the TSQL_HEX_CONSTANTS database option
to OFF.
♦
Data type lengths and precision of less than one are not allowed.
♦
Only the NUMERIC data type with scale = 0 can be used for the
Transact-SQL
identity
♦
You should avoid default precision and scale settings for NUMERIC
and DECIMAL data types, because these are different between Adaptive
Server Anywhere and Adaptive Server Enterprise. In Adaptive Server
Anywhere, the default precision is 30 and the default scale is 6. In
Adaptive Server Enterprise, the default precision is 18 and the default
scale is 0.
♦
The FLOAT ( p ) data type is a synonym for REAL or DOUBLE,
depending on the value of p. For Adaptive Server Enterprise, REAL is
used for p less than or equal to 15, and DOUBLE for p greater than 15.
For Adaptive Server Anywhere, the cutoff is platform-dependent, but on
all platforms the cutoff value is greater than 15.
$
For information about changing the defaults by setting database
options, see "PRECISION option" on page 205 and "SCALE option" on
page 210.
A 64-bit integer.
[ UNSIGNED ] BIGINT
column.
Need help?
Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?
Questions and answers