Example: NUMBER Data Type - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
tpf1598412463935.ditamap
dita:ditavalPath
tpf1598412463935.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantageā„¢

Consider the following table definition:

CREATE TABLE num_tab
  (n1 NUMBER(*,3),
   n2 NUMBER,
   n3 NUMBER(*),
   n4 NUMBER(5,1),
   n5 NUMBER(3) );

The following table shows the result of inserting various values into a column defined as NUMBER (3).

If you insert this value... the value of column n5 will be...
1.234 1
123.6789 124
1234.56 An error is returned since the inserted value exceeds the size of column n5.

The following table shows the result of inserting various values into a column defined as NUMBER (*,3).

If you insert this value... the value of column n1 will be...
1.234 1.234
1234.6789 1234.679