Example: Volatile Table With Single-Level Partitioning - Analytics Database - Teradata Vantage

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

The following example demonstrates a valid CREATE VOLATILE TABLE request with single-level partitioning.

     CREATE VOLATILE TABLE V_lineitem (
       l_orderkey INTEGER NOT NULL,
       l_partkey INTEGER NOT NULL,
       l_suppkey INTEGER,
       l_linenumber INTEGER,
       l_quantity INTEGER NOT NULL,
       l_extendedprice DECIMAL(13,2) NOT NULL,
       l_discount DECIMAL(13,2),
       l_tax DECIMAL(13,2),
       l_returnflag CHARACTER(1),
       l_linestatus CHARACTER(1),
       l_shipdate DATE FORMAT 'yyyy-mm-dd',
       l_commitdate DATE FORMAT 'yyyy-mm-dd',
       l_receiptdate DATE FORMAT 'yyyy-mm-dd',
       l_shipinstruct VARCHAR(25),
       l_shipmode VARCHAR(10),
       l_comment VARCHAR(44))
     PRIMARY INDEX (l_orderkey)
     PARTITION BY RANGE_N(l_shipdate BETWEEN DATE '1992-01-01' 
                                     AND     DATE '1998-12-31' 
                                     EACH INTERVAL '1' MONTH);