ALTER TABLE Statement (Map and Colocation Form) | Teradata Vantage - ALTER TABLE (Map and Colocation Form) - 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™

Moves a table from one map to another. You can also change the colocation name for a sparse map.

Tables that have the same sparse map and colocation name can be joined using the same primary index or primary AMP index columns without redistributing or duplicating rows. For example, you can colocate two tables, then join the tables on the primary index or primary AMP index columns.

You can also use SQL procedures provided in the TDMaps system database to move tables from one map to another. See "Using Maps to Position Table Data across AMPs," in Teradata Vantage™ - Database Administration, B035-1093.

Required Privileges

You must have the DROP TABLE privilege for the table and you must have been granted the specified map, except when the map you specify is the current map for the table or you specify the same map determined to be the default map according to the following order of precedence:
  • If the immediate owner is not the creator:
    • Default map, if defined, for the profile of the immediate owner.
    • Default map, if defined, for the immediate owner.
    • System-default map.
  • Default map, if defined, for the profile of the creator.
  • Default map, if defined, for the creator.
  • System-default map.

See the CREATE USER DEFAULT MAP option, CREATE DATABASE DEFAULT MAP option, or CREATE PROFILE DEFAULT MAP option.

See "GRANT MAP" in Teradata Vantage™ - SQL Data Control Language, B035-1149.