Rules and Restrictions for SELECT AND CONSUME Statements - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
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.