16.20 - source_data_type - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-24
dita:mapPath
wkf1512081455740.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

Either a structured or distinct UDT or any valid predefined data type. You cannot specify an ARRAY or VARRAY type. For a list of data types, see Data Types Syntax.

Either source_data_type or target_data_type or both must be a UDT. This can be either a user-created UDT or an internal UDT.

If source_data_type is a predefined data type, then its cast routine must be a cast function. See SPECIFIC FUNCTION.

Example: Casting Source Data as VARCHAR

The following CREATE CAST request creates a cast operation that converts the source data type circle to the target data type VARCHAR(32) using the method having the specific method name circleToVarchar.

     CREATE CAST (circle AS VARCHAR(32))
     WITH SPECIFIC METHOD SYSUDTLIB.circleToVarchar