Table Column Elements | CREATE TABLE | Teradata Vantage - 17.10 - About Table Column Elements - 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)

This clause defines the table column elements.

You must specify a name and data type for each column defined for a table. When you create a table copy using the CREATE TABLE … AS syntax, you either carry over the source table column types by default or specify new column data types using a query expression. Each data type can be further defined with one or more attribute definitions.

You can specify the following optional column attributes:
  • Data type attribute declaration
  • Column nullability
  • Multivalue and algorithmic compression
  • Column storage attributes
  • Output format attributes
  • Default value attributes

    See Teradata Vantage™ - Data Types and Literals, B035-1143 for details about the preceding list of attributes.

  • Column constraint attributes
    • PRIMARY KEY constraint definition
    • UNIQUE constraint definition
    • FOREIGN KEY ... REFERENCES constraint definition
    • CHECK constraint definition
    • Row-level security constraint assignments.

    You can also specify PRIMARY KEY, UNIQUE, FOREIGN KEY, and CHECK constraints as table attributes, but you cannot specify a row-level security constraint as a table attribute.