Contents Index BIGINT data type [Numeric] DOUBLE data type [Numeric]

ASA SQL Reference
  SQL Data Types
    Numeric data types

DECIMAL data type [Numeric]


Function 

A decimal number with precision total digits and with scale of the digits after the decimal point.

Syntax 

DECIMAL | DEC } [ ( precision [ , scale ] ) ]

Usage 

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.

Parameters 

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].

Standards and compatibility 
See also 

FLOAT data type [Numeric]

REAL data type [Numeric]

DOUBLE data type [Numeric]


Contents Index BIGINT data type [Numeric] DOUBLE data type [Numeric]