cursor_specification - Teradata Vantage - Analytics Database

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-22
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

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.