Sometimes you want to use cursor without Open Cursor,you can use ref cursor .
syntax :
declare
SQL_Text varchar2(32760) := 'qurey'; --your query goes here
cur sys_refcursor;
begin
open cur for SQL_Text;
end;
example :
V_query := ‘Cursor statement’ ;
Link Useful :
1-Blog
2-Cursor Loop Example
Enjoy
Osama mustafa