Number Types

BINARY_INTEGER and PLS_INTEGER

Apparently means the same thing. Used to store signed integers. 32 bit precision (-2147483648 to 2147483647). Requires less storage than NUMBERs. PLSINTEGERs_ _use hardware arithmetic, so they're faster than NUMBER operations, which use library arithmetic. If you need more range, use the INTEGER type.

Subtypes:

NATURAL

0 to Inf

NATURALN

0 to Inf, not NULL

POSITIVE

1 to Inf

POSITIVEN

1 to Inf, not NULL

SIGNTYPE

-1, 0, or 1

BINARY_FLOAT and BINARY_DOUBLE

IEEE 754 floating-point numbers. Used for high-speed scientific calculation but rounding errors make it unsuitable for financial data. Type promotion when multiplying different types: NUMBER > BINARY_FLOAT > BINARY_DOUBLE. Need to check certain conditions when using these types as they don't raise exceptions (TODO: expand).

NUMBER

Stores fixed- or floating-point numbers with absolute values in the range1E-130up to (but not including)1.0E126.If the value assigned to a NUMBER is below this range, it will be rounded to 0. If the result of a NUMBER computation exceeds the upper limit, the result is undefined and will produce unreliable results.

Syntax: NUMBER[(precision,scale)]

Specify precision and scale for a fixed-point number, otherwise it will be floating-point. Precision is the total number of digits and scale is the number of digits to the right of the decimal point. Use scale of 0 for integers, or negative scale to round left of the decimal point.

Subtypes:

DEC/DECIMAL/NUMERIC

Fixed-point numbers with a max precision (total length) of 38 decimal digits.

DOUBLE PRECISION/FLOAT

Floating-point numbers with a max precision of ~38 decimal digits.

REAL

Floating-point numbers with max precision of ~18 decimal digits.

INT/INTEGER/SMALLINT

Integers with a max precision of 38 decimal digits.

results matching ""

    No results matching ""