oracle plsql存储过程调试出错_PLS-00361

SQL> create or replace procedure p_query_all_question(o_result sys_refcursor)
  2  --在线答疑显示所有问题
  3 
  4  --显示的列:学段,科目,题目内容,提问者,浏览数,状态,更新时间
  5  --涉及到的表:问题信息,问题统计信息,学段科目信息
  6  as
  7  v_sqlstr varchar2(4000);
  8  begin
  9  v_sqlstr:='select
 10                  xk.teacherstage,--学段
 11                  xk.subjectname,--科目
 12                  qi.question_title,--题目内容
 13                  qi.question_id,--提问者
 14                  qt.browse_count,--浏览数
 15                  qi.question_status,--状态
 16                  qt.lastest_update_time --更新时间
 17            from Q_QUESTIONINFO qi,Q_QUESTION_STAT qs,E_SUBJECTINFO xk
 18            where qi.questionid=qs.questionid and qi.subject_id=xk.subject_id
 19            ';
 20  open o_result for v_sqlstr;
 21           
 22  end;
 23  /
Warning: Procedure created with compilation errors.
SQL> show err
Errors for PROCEDURE P_QUERY_ALL_QUESTION:
LINE/COL ERROR
-------- -----------------------------------------------------------------
20/1     PL/SQL: Statement ignored
20/6     PLS-00361: IN cursor 'O_RESULT' cannot be OPEN'ed
请使用浏览器的分享功能分享到微信等