How to use this the cursor directly query
Realize the select * from cursor
This kind of feeling
CodePudding user response:
Not met the demand, the reference under this posthttps://www.jb51.net/article/32447.htm
CodePudding user response:
Dynamic cursor statement to accept, and then into the collection using theDECLARE
S SYS_REFCURSOR;
The TYPE t IS the TABLE OF test_fan % ROWTYPE;
T1 t;
The BEGIN
DECLARE
PROCEDURE test1 (o_cursor OUT SYS_REFCURSOR) IS
The BEGIN
The OPEN o_cursor FOR
SELECT * FROM test_fan;
The END;
The BEGIN
Test1 (o_cursor=& gt; S);
The FETCH s BULK COLLECT
INTO the t1;
FOR I IN 1.. T1. Count LOOP
Dbms_output. Put_line (t1 (I). The object_name);
END LOOP;
The CLOSE s;
The END;
The END;
Do not know if you want
CodePudding user response:
Learn about the Oracle pipeline function