declare sql_Text varchar2(32760) := 'select * from dual'; --your query goes here cur sys_refcursor; begin open cur for sql_Text; end;
使用Ref Cursors时,可以直接使用open-for,而不是立即执行.