Example: Creating a Simple Queue Table - 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 creates a simple queue table.

The first column defined for the table is the Query Insertion Timestamp (QITS) column. This is required for all queue tables.

The QITS column must be defined with a timestamp data type with the same precision and default value as specified in the example. You need not specify a precision for the TIMESTAMP data type specification. The default value, 6, is required for queue tables.

The QITS column is not the (nonunique) primary index for the table.

       CREATE SET TABLE qtbl_1, QUEUE, FALLBACK, 
       NO BEFORE JOURNAL,
       NO AFTER JOURNAL (
        col_1 TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
        col_2 INTEGER,
        col_3 INTEGER)
       PRIMARY INDEX (col_2, col_3);