SQL Cursors | VantageCloud Lake - SQL Cursors - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Publication Date
February 2025
Publication ID
B700-4600-008K
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
ft:sourceId
dita
dita:id
jbe1714339405530

This section describes SQL cursors and explains when and how to use SQL cursors to point to rows in an SQL response set.

A cursor is a data structure that stored procedures and Preprocessor2 use at runtime to point to the result rows in a response set returned by an SQL query.

Stored procedures and embedded SQL also use cursors to manage inserts, updates, execution of multiple-statement requests, and SQL macros.

The syntax of functionally similar cursor control statements depends on whether the cursors are used for stored procedures or embedded SQL. This document presents variant syntax forms with the individual cursor control statements. There are cursor control statements that are valid only with embedded SQL.

Cursors are not valid for sessions you conduct interactively from a terminal using a query manager like BTEQ.