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

SQL Data Manipulation Language

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
fbo1512081269404.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.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.