Syntax

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


expression
The data expression to be converted to the new definition defined by data_type_list
data_type_list
A data type declaration or data attributes or both.
List elements must be separated by commas.
This syntax is called Teradata conversion syntax, and is non-ANSI. Using Teradata conversion syntax is strongly discouraged. It is a Teradata extension to the ANSI SQL:2011 standard and is retained only for backward compatibility with existing applications. You should always use the CAST function to perform conversions in new applications to ensure ANSI compatibility.

For example, in the following SELECT statement, a TITLE phrase overrides the default heading (the column name) for EmpNo, and a FORMAT phrase modifies the display format defined for Salary data in the CREATE TABLE statement.

SELECT EmpNo (TITLE 'Emp#'), Salary (FORMAT '$$$,$$9.99')
FROM Employee;

Restrictions apply to the data types that Teradata conversion syntax supports. For example, you cannot use Teradata conversion syntax to convert data to a UDT. For more information, see Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates, B035-1145.