16.20 - QITS_column_name - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-24
dita:mapPath
wkf1512081455740.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

The Query Insertion Timestamp (QITS) column.

The first column defined for any queue table must be a QITS column. Teradata Database uses the QITS column to maintain the FIFO ordering of rows in the queue table. Each queue table has only one QITS column, and it must be defined with the following attributes:

   column_name TIMESTAMP(6) [WITH TIME ZONE] NOT NULL
               DEFAULT CURRENT_TIMESTAMP(6)

The precision specification is optional for the TIMESTAMP data type specification and its DEFAULT attribute, but you cannot define either with a precision value other than 6.

The QITS column cannot be defined as any of the following:

  • UNIQUE PRIMARY INDEX
  • UNIQUE
  • PRIMARY KEY
  • Unique secondary index (see CREATE INDEX )
  • Identity column

The QITS column can be the NUPI for a table, but you should avoid following that practice. Be aware that if you do not define an explicit primary index, primary key, or uniquely constrained column in the table, then the QITS column becomes its primary index by default because it is the first column defined for the table.

You might find it useful to find additional queue management columns for functions such as message identification or queue sequencing.