identity_column - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

You cannot specify identity columns for nonpartitioned NoPI tables.

If you specify an identity column for a table that is used with Teradata Unity, you must enable Change Data Multicast (CDM) in Unity and Vantage. See Teradata® Unity™ User Guide, B035-2520.

Identity columns are ANSI SQL:2011-compliant.

UDT, Geospatial, and Period columns are not supported as Identity columns.

See Identity Column Parameters and column_constraint_attributes.

GENERATED ALWAYS AS IDENTITY
Identity column values are always system-generated.
You cannot insert values into, or update, an identity column defined as GENERATED ALWAYS AS IDENTITY.
GENERATED BY DEFAULT AS IDENTITY
Identity column values can be system-generated or user-inserted:
  • When you insert a null into the column, the system generates an identity column value to replace it.
  • When you insert a value into the column, the system inserts the value into the identity column.