How Cursors Are Incremented | Teradata Vantage - How Cursors Are Incremented - Advanced SQL Engine - Teradata Database

SQL Stored Procedures and Embedded SQL

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
xqq1557098602407.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1148
lifecycle
previous
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.