How Cursors Are Incremented | Teradata Vantage - How Cursors Are Incremented - Teradata Vantage - Analytics Database

SQL Stored Procedures and Embedded SQL

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
2023-10-30
dita:mapPath
frc1628111662093.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
rjx1472253414573
lifecycle
latest
Product Category
Teradata Vantageā„¢

The FETCH statement increments cursors to step through the response set rows.

Stored procedure cursors have some additional facilities that enable more flexibility than embedded SQL cursors possess:
  • The FIRST and NEXT options of the FETCH statement and the SCROLL and NO SCROLL options of the DECLARE CURSOR statement enable cursors to either scroll forward to the next row in the spool or to scroll directly to the first row in the spool.
  • Within a FOR loop, a cursor moves to the next row with each iteration of the loop.