Example: Implicit Conversion of Character to Numeric

Teradata Vantageā„¢ Data Types and Literals

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

The INSERT statement in the following example implicitly converts the character data type to the target numeric data type:

CREATE TABLE t1 
(f1 DECIMAL(10,2) FORMAT 'G-U(9)D9(2)');
   
INSERT t1 ('USD12,345,678.90');

If a column definition in a CREATE TABLE statement does not specify a FORMAT phrase for the data type, the column uses the corresponding data type default format as defined in the specification for data formatting (SDF) file.