Declare and OPEN a cursor:
DECLARE a cursor CURSOR cursor_name IS select_statement; CURSOR cursor_name [(parameter_name datatype, ...)] IS select_statement; note: the "select_statement" cannot include an INTO clause. Cursor parameters follow the syntax cursor_parameter [IN] datatype [{:= | DEFAULT} expr]
Cursor parameters are passed positionally when the cursor is opened,
each parameter that was declared must have a corresponding parameter
in the OPEN statement.
OPEN a cursor OPEN cursor_name; or OPEN cursor_name param1 param2...;
Related: