Cursors and ANSI System-Time Table Queries - Teradata Database

SQL External Routine Programming

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata® Database

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. Procedures and embedded SQL also use cursors to manage inserts, updates, execution of multistatement requests, and SQL macros.

The DML semantics described for system-versioned system-time tables apply to DML associated with a cursor, with some limitations that relate to positioned (updatable) cursors:

  • A SELECT statement on a temporal table can open an updatable cursor if the statement conforms to all existing rules on updatable cursors.
  • A SELECT or DELETE statement that opens an updatable cursor has the same syntax as described in SQL Data Manipulation Language, but for system-versioned system-time tables the FROM clause cannot t include the special ANSI temporal FOR SYSTEM TIME clause.
  •  

    For more information on...

    See...

    cursors

    SQL Stored Procedures and Embedded SQL