15.10 - QITS_column_name - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

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.