The DECLARE CURSOR statement defines a named result table (see
named/unnamed result table) with the name result_table_name .Syntax
<declare_cursor_statement> ::= DECLARE <result_table_name> CURSOR FOR <select_statement>
result_table_name, select_statementExplanation
An
OPEN CURSOR statement with the name of the result table is required to actually generate the result table defined with a DECLARE CURSOR statement.See also:
SELECT statement (select_statement)