15.10 - Example: Dropping All But 1 Column from a Column Partition - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Release Number
15.10
Published
December 2015
Content Type
Programming Reference
Publication ID
B035-1144-151K
Language
English (United States)

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;