15.00 - Floating Point NUMBER Types - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

Floating Point NUMBER Types

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 when they operate on the NUMBER(p,s) type.

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.

Note: 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.

See SQL Data Types and Literals for more detailed information about the NUMBER data type.