17.10 - Example: Dropping All But 1 Column from a Column Partition - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
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;