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

Teradata Vantage™ - SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1184-171K
Language
English (United States)

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.