Data Type and Attribute Definitions - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™

The data type defined for a column can be changed only if the new type does not require a change to the existing data. The rules for changing the data type of a column are listed in Rules for Changing Column Data Types. Also see Procedure to Change Column Data Types.

For an existing column, the following rules are true for data types and attributes with the exception of LOB data types.

You can specify either of the following:
  • FORMAT, TITLE, DEFAULT, or WITH DEFAULT phrases.
  • Changes in data type attributes or in data types in cases where the change does not require rewriting existing rows.

The following table provides examples of valid and non-valid type and attribute definition changes.

Changing this form … TO this form … IS …
CASESPECIFIC NOT CASESPECIFIC valid
NOT CASESPECIFIC CASESPECIFIC valid
CASESPECIFIC UPPERCASE not valid
 
VARCHAR(6) VARCHAR(12) valid
VARCHAR(12) VARCHAR(6) not valid
For BLOB and CLOB data types, you can only alter the following column attributes.
  • NULL
  • NOT NULL
  • TITLE
  • FORMAT

No other data type attributes are permitted for BLOB or CLOB data.

You cannot specify a character data set of KANJI1 for CHARACTER, VARCHAR, or CLOB data types.