Storing NUMBER Data - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

You can achieve optimal space savings for NUMBER data using either multivalue compression, algorithmic compression, or a combination of both.

NUMBER data is stored as a variable length field from 0 to 18 bytes in width. You can use the NUMBER type to represent both fixed point and floating point decimal numbers, depending on the syntax you use to specify the type. In the following table, the characters p and s represent precision and scale, respectively.

General Type Syntax Functional Description
Fixed point NUMBER(p,s) Similar to DECIMAL(p,s)
NUMBER(p) Similar to DECIMAL(p)
Floating point NUMBER(*,s) Floating point decimal with s fractional digits
NUMBER A floating point number
NUMBER(*) Same as NUMBER

The following table highlights the approximate equivalences/valid substitutions between the fixed and floating point NUMBER types with other exact (fixed point) and approximate (floating point) types.

NUMBER Type Can Use NUMBER Data Type Where You Can Use These Data Types Maximum Precision in Digits
Fixed point
  • DECIMAL
  • NUMERIC
38
Floating point
  • FLOAT
  • REAL
  • DOUBLE PRECISION
40

Whether a NUMBER type represents a fixed-point value or a floating-point value does not affect its storage or accuracy. See Numeric Data Types, Non-INTEGER Numeric Data Types, and NUMBER Data Type for more information about the NUMBER type.