Contents Index INT or INTEGER data type [Numeric] REAL data type [Numeric]

ASA SQL Reference
  SQL Data Types
    Numeric data types

NUMERIC data type [Numeric]


Function 

Same as DECIMAL.

Syntax 

NUMERIC [ ( precision [ , scale ] ) ]

Usage 

The NUMERIC data type is an exact numeric data type; its accuracy is preserved to the least significant digit after arithmetic operations.

The number of bytes required to store 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 value is 30.

scale    An integer expression that specifies the number of digits after the decimal point. The default value 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 INT or INTEGER data type [Numeric] REAL data type [Numeric]