Recreating a Table - Teradata Database

Teradata Database Administration

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
Product Category
Software

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 SQL Data Definition Language.
  • Change a data type attribute that affects existing data. For rules on changing data types, see “ALTER TABLE” in SQL Data Definition Language.
  • 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.
  • Note: 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.