17.05 - cursor_specification - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1144-175K
Language
English (United States)

The SELECT statement specifying the column names or expressions from which to fetch data rows in the CURSOR clause.

You can specify these options for cursor specification statements.

SELECT
The columns or expressions specified by column_name form the cursor.
See Teradata Vantage™ - SQL Stored Procedures and Embedded SQL , B035-1148 for details.
column_name
Name of the column set from which to fetch data.
AS
Optional introduction to column_name_alias.
alias_name
Alias for the table referenced by table_name.column_name_alias is also used to name expressions.
expression
Any valid SQL expression.
table_name
Name of a table or view from which rows are to be fetched.
search_condition
Optional search condition that must be satisfied by the row set to be fetched by the SELECT statement.
Other SELECT Clauses
Clauses such as ORDER BY, GROUP BY, and HAVING.
These clauses are valid only for read-only cursors. None is valid when specified with updatable cursors.
WITH … BY clauses are not allowed in SQL procedure cursors.