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

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

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;