Defines and declares a reference cursor before explicitly opening it
SQL>
SQL> DECLARE
2 TYPE weakly_typed IS REF CURSOR;
3 quick WEAKLY_TYPED;
4 BEGIN
5 OPEN quick FOR
6 SELECT item_title
7 , COUNT(*)
8 FROM item
9 HAVING (COUNT(*) > 2)
10 GROUP BY item_title;
11 :refcur := quick;
12 END;
13 /
SP2-0552: Bind variable "REFCUR" not declared.
SQL>
Related examples in the same category