Table Column Elements | CREATE TABLE | Teradata Vantage - Table Column Elements - 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™

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.