Using FORMAT in CREATE TABLE - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantage™

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