SELECT AND CONSUME - 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™

Purpose

Returns data from the row with the oldest insertion timestamp in the specified queue table and deletes the row from the queue table.

Syntax



Required Privileges

To perform a SELECT AND CONSUME from a queue table, you must have the SELECT and DELETE privileges on that table.

Syntax Elements

select_list
An asterisk ( * ) or a comma-separated list of valid SQL expressions.
If select_list specifies *, all columns from the queue table specified in the FROM clause are returned.
The select list must not contain aggregate or ordered analytical functions.
queue_table_name
Name of a queue table that was created with the QUEUE option in the CREATE TABLE statement.

ANSI Compliance

SELECT AND CONSUME is a Teradata extension to the ANSI SQL:2011 standard.