CURSOR DECLARATION

Description

Rather than executing a whole query at once, it is possible to set up a cursor that encapsulates the query, and then read the query result a few rows at a time.

Click here to navigate to the PostgreSQL documentation page for this syntax.

Cursor Statement is supported by Snowflake.

Grammar Syntax

  name [ [ NO ] SCROLL ] CURSOR [ ( arguments ) ] FOR query;

Sample Source Patterns

CURSORNAME0 CURSOR FOR SELECT * FROM TABLITA WHERE SOMECOLUM = 1;

CURSORNAME1 CURSOR (KEY1 integer, KEY2 integer) FOR SELECT * FROM TABLITA
WHERE SOMECOLUM1 = KEY1 AND SOMECOLUM2 = KEY2;

Known Issues

No issues were found.

No related EWIs.

Last updated