Table Column Elements | CREATE TABLE | Teradata Vantage - Table Column Elements - Teradata Vantage - Analytics Database

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2024-12-13
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jbg1472252759029
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.