Cursor Variables
Translation reference for cursor variables and the OPEN FOR statement
Some parts in the output code are omitted for clarity reasons.
Description
A cursor variable is like an explicit cursor that is not limited to one query.
(Oracle PL/SQL Language Reference Cursor Variable Declaration)
Snowflake Scripting has no direct equivalence with cursor variables and the OPEN FOR
statement, however, they can be emulated with different workarounds to get functional equivalence.
Sample Source Patterns
1. OPEN FOR statement with dynamic SQL inside a VARCHAR variable
IN -> Oracle_01.sql
OUT -> Oracle_01.sql
2. OPEN FOR statement with dynamic SQL inside a string literal.
IN -> Oracle_02.sql
OUT -> Oracle_02.sql
3. OPEN FOR statement with SELECT statement
IN -> Oracle_03.sql
OUT -> Oracle_03.sql
4. Cursor Variable declared with REF CURSOR type
IN -> Oracle_04.sql
OUT -> Oracle_04.sql
5. OPEN FOR statement with USING clause
IN -> Oracle_05.sql
OUT -> Oracle_05.sql
Known Issues
No issues were found.
Related EWIs
Last updated