Example: Dropping All But 1 Column from a Column Partition - 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™

The following example drops 9 columns from the unpopulated orders table, leaving only 1 column in one column partition.

ALTER TABLE orders
DROP o_custkey,
DROP o_orderstatus,
DROP o_totalprice,
DROP o_ordertsz,
DROP o_salesperson,
DROP o_ordersubstatus,
DROP o_ship_addr,
DROP o_bill_addr,
DROP o_item_count;

This results in the following table definition.

     CREATE TABLE orders (
       o_orderkey INTEGER NOT NULL )
     PARTITION BY COLUMN ADD 65531;