In SQL, a number -- i.e.: any signed, or unsigned, combination of the digits 0 to 9 -- is either an exact numeric value or an approximate numeric value. A numeric value may be a <literal>, the value of a parameter or a host language variable or the result of any expression or argument (including a possibly qualified <Column name>) that evaluates to a number.

Exact numeric values have a precision and a scale. The precision is a positive integer that determines the number of significant digits in the radix. The scale is a non-negative integer that specifies the number of digits to the right of the value's decimal point. Exact numeric values are stored in one of the four exact numeric <data type>s: INTEGER, SMALLINT, NUMERIC or DECIMAL.

Approximate numeric values, or floating point numbers, have two parts: a signed decimal number (the mantissa) and a signed integer (the exponent). The exponent specifies the magnitude of the mantissa, so the value of such a number is the mantissa raised to the power of the exponent. Approximate numeric values also have a precision: a positive integer that specifies the number of significant bits in the mantissa. Approximate numeric values are stored in one of the three approximate numeric <data type>s: FLOAT, REAL or DOUBLE PRECISION.

Note:

Portions of the text in this entry are Copyright © 1999 by Ocelot Computer Services Incorporated. Used by permission.

Comments

Comments loading...