Example: Implicit Type Conversion During Assignment - 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

Consider the following tables:

CREATE TABLE T1
   (Fname VARCHAR(25)
   ,Fid   INTEGER
   ,Yrs   CHARACTER(2));
CREATE TABLE T2
   (Wname VARCHAR(25)
   ,Wid   INTEGER
   ,Age   SMALLINT);

In the following statement, Teradata Database implicitly converts the character string in T1.Yrs to a numeric value:

UPDATE T2 SET Age = T1.Yrs + 5;

This is not evident in the syntax of the source statement, but becomes evident when the dictionary information for tables T1 and T2 is accessed.