Example: Non-Valid MODIFY PRIMARY INDEX Statements - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

The following requests are not valid. These examples do not specify options that alter the table.

     ALTER TABLE orders 
     MODIFY PRIMARY INDEX;
    
     ALTER TABLE orders 
     MODIFY NOT UNIQUE PRIMARY INDEX;

The next example attempts to alter the table not to have a primary index and to add column and row partitioning. The request uses correct syntax but is not valid because orders is populated with rows.

     ALTER TABLE orders 
     MODIFY NO PRIMARY INDEX 
     PARTITION BY (COLUMN ADD 5,
                   RANGE_N(o_ordertsz BETWEEN TIMESTAMP 
                                      '2003-01-01 00:00:00.000000+00:00'
                                      AND     TIMESTAMP 
                                      '2009-12-31 23:59:59.999999+00:00' 
                                      EACH INTERVAL '1' MONTH) );