Recreate a Table | Teradata Vantage - Recreating a Table - Advanced SQL Engine - Teradata Database

Database Administration

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
rgu1556127906220.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1093
lifecycle
previous
Product Category
Teradata Vantage™
You may need to recreate a data table to:
  • Change a default PI to a defined PI for a nonempty table.
  • Add or remove a PI for a nonempty table.
  • Change the PI to a different PI for a nonempty table.
  • Change a NUPI to a UPI in a populated table when there is no USI (however, usually you would just create the USI on the table, and then alter it).
  • Redefine the partitioning of a populated table. In some cases, you can still use ALTER TABLE; see “ALTER TABLE” in Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.
  • Change a data type attribute that affects existing data. For rules on changing data types, see “ALTER TABLE” in Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.
  • Define or delete COMPRESS storage attributes for an existing column.
  • Add columns that would otherwise exceed the maximum for the number of columns defined during the life of a table.
  • Move the table to another database or user.
  • Change the groupings of columns into column partitions.
It is best practice to access a table via a view, especially for tables used by multiple users.

Use the SHOW TABLE or SHOW IN XML TABLE request to display the current table definition, which you can then modify and submit.