Using FORMAT in CREATE TABLE - Teradata Vantage NewSQL Engine - 16.20

Teradata Vantage™ Data Types and Literals

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1143-162K

When the FORMAT phrase is used in the CREATE TABLE statement, as follows:

CREATE TABLE Test1 (Col1 DECIMAL(4) FORMAT '9999S'); 

then zoned input character strings can be loaded with standard INSERT statements, whether the data is defined:

INSERT INTO Test1 (Col1) VALUES ('123J'); 

or read from a client system data record via the USING modifier:

USING Ext1 (CHAR(4)) 
INSERT INTO Test1 (Col1)
VALUES (:Ext1); 

The data record contains the string ‘123J’.

Subsequently, a simple select, such as:

SELECT Col1 FROM Test1;

returns:

Col1
----
  
123J