ASA SQL Reference
SQL Data Types
Numeric data types
A decimal number with precision total digits and with scale of the digits after the decimal point.
{ DECIMAL | DEC } [ ( precision [ , scale ] ) ]
The DECIMAL data type is an exact numeric data type; its accuracy is preserved to the least significant digit after arithmetic operations.
The storage required for a decimal number can be estimated as
2 + int( (before + 1)/2 ) + int( (after + 1)/2 )
The function int takes the integer portion of its argument, and before and after are the number of significant digits before and after the decimal point. The storage is based on the value being stored, not on the maximum precision and scale allowed in the column.
precision An integer expression that specifies the number of digits in the expression. The default setting is 30.
scale An integer expression that specifies the number of digits after the decimal point. The default setting is 6.
The defaults can be changed by setting database options. For information, see PRECISION option [database] and SCALE option [database].
SQL/92 Compatible with SQL/92.
Sybase Compatible with Adaptive Server Enterprise.