1declare
2 TYPE CurTyp IS REF CURSOR;
3 test_cv CurTyp;
4 type idType is table of test1.id%type;
5 type descType is table of test1.description%type;
6 v_id test1.id%type;
7 v_desc test1.description%type;
8 sqlStmt varchar2(100);
9BEGIN
10 sqlStmt := 'SELECT id,description FROM test1';
11 OPEN test_cv FOR sqlStmt;
12 FETCH test_cv INTO v_id,v_desc;
13* END;
SQL> /
PL/SQL 过程已成功完成。