Target Table Kind Defaults | CREATE TABLE ... AS | Teradata Vantage - Target Table Kind Defaults - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
imq1591724555718.ditamap
dita:ditavalPath
imq1591724555718.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

If the source is a base table and you do not specify an explicit table kind, the table kind of the target table defaults to the source table kind.

Note that if you use the abbreviated CT … AS syntax, you cannot specify a table kind. Because of this, the system automatically copies the table kind of the source table to the target table when you use the CT … AS syntax.

If the source is a subquery, the system creates the target table using the default table kind for the session mode unless you specify an explicit table kind in the CREATE TABLE statement, as indicated in the following table.

IF you copy to a target table using a subquery while in this session mode … THEN the target table has this table kind unless you explicitly specify something different …
ANSI MULTISET
Teradata SET

For example, if you copy a definition to a target table in ANSI session mode using a subquery, then the table kind of the target table defaults to MULTISET unless you explicitly specify the SET table kind in your CREATE TABLE … AS … statement.