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

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
qtb1554762060450.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™
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.