Data Type and Attribute Definitions - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
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.