Floating Point NUMBER Types - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The requirements of an exact NUMBER include that for any addition, subtraction, multiplication, and division operations, the result must be an exact numeric value.

The NUMBER(p,s) syntax is not exact because the results of the previously mentioned dyadic operations do not produce an exact numeric result value.

Teradata supports the following predefined floating point numeric data type extensions to the ANSI/ISO SQL:2011 standard.

Data Type Reason the Type is Not Exact Type Family
NUMBER(p,s) The result of the dyadic operations +, -, *, and / on NUMBER(p,s) values do not produce an exact numeric value. fractional floating point numeric

The exact floating point NUMBER types can be used anywhere an approximate numeric type is used, but NUMBER values are stored as exact values in the same way as the exact NUMBER types and with the same accuracy.

Floating point NUMBER types are not approximate types.

NUMBER NUMBER and NUMBER(*) do not specify a scale.
NUMBER(*)
NUMBER(*,s) NUMBER(*,s) has a precision that cannot be expressed as an integer for either base 2 or base 10 arithmetic.
You can use the NUMBER type to represent both fixed point and floating point values, depending on the syntax you use to specify the value.