Example: Revalidating the Partitioning for a Table - Teradata Vantage - Analytics Database

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-22
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

Suppose that one of the following events causes you to suspect that incorrect partitioning of the orders table has occurred.

  • You suspect that partitioning might not be correct after a restore.
  • You copy the table to a system with different hardware or operating system.
  • A system malfunction has occurred.
  • The data dictionary has not been updated for tables created in an earlier release.

You can validate the partitioning of orders table rows using either of the following ALTER TABLE requests, with the first request deleting any problematic rows and the second moving them into a new table.

     ALTER TABLE orders 
     REVALIDATE WITH DELETE;
    
     ALTER TABLE orders 
     REVALIDATE WITH INSERT INTO old_orders;

Now assume that orders is column-partitioned and is named orders_cp. The following ALTER TABLE requests validate the partitioning of orders_cp table rows in the same way that they were validated in the previous part of this example.

     ALTER TABLE orders_cp 
     REVALIDATE WITH DELETE;
    
     ALTER TABLE orders_cp 
     REVALIDATE WITH INSERT INTO old_orders;