17.05 - Example: Making Composite Changes to a Column: NULL to NOT NULL - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1144-175K
Language
English (United States)

A composite change to a column implies changing more than one attribute of that column in one request. NULL columns can be changed to NOT NULL, along with other attribute changes, in one request. The following example changes both the case and NULL attribute of column_2. An error is returned if abc contains any rows with nulls in column_2.

     ALTER TABLE abc ADD column_2 CASESPECIFIC NOT NULL;