Example: Column-Partitioned Table with Default Autocompression - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

This example defines a column-partitioned table where each column is in its own partition with system-determined COLUMN format except for column partition o_comment , which has user-specified ROW format and is explicitly defined not to have autocompression.

     CREATE TABLE orders (
       o_orderkey     INTEGER NOT NULL,
       o_custkey      INTEGER,
       o_orderstatus  CHARACTER(1) CASESPECIFIC,
       o_totalprice   DECIMAL(13,2) NOT NULL,
       o_orderdate    DATE FORMAT 'yyyy-mm-dd' NOT NULL,
       o_shippriority INTEGER,
       ROW(o_comment  VARCHAR(79)) NO AUTO COMPRESS)
     PARTITION BY COLUMN,
     UNIQUE INDEX (o_orderkey);