17.05 - Rules and Restrictions for SELECT AND CONSUME Statements - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1146-175K
Language
English (United States)
The rules and restrictions are:
  • Only one SELECT AND CONSUME statement can appear in a multistatement request.
  • A multistatement request that includes a SELECT AND CONSUME statement cannot also include a DELETE, UPDATE, UPSERT, or MERGE statement that references the same queue table.
  • SELECT AND CONSUME statements cannot be specified in any of these SQL constructs:
    • Subqueries with the exception INSERT … SELECT statements
    • Search conditions
    • Logical predicates
    • Operations using the SQL UNION, MINUS, or EXCEPT/MINUS SET operators
  • A limit of 20 percent of the total possible PE sessions (24 per PE by default) can enter a delay state as a result of submitting a SELECT AND CONSUME statement.
  • For embedded SQL, the selection form of a DECLARE CURSOR statement cannot specify a SELECT AND CONSUME statement if the preprocessor TRANSACT or -tr option is set to ANSI.