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
- 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.