WHAT IS REFCURSOR IN ORACLE ?
Answers were Sorted based on User's Feedback
Answer / takkola
hi..
Refcursor is nothing but dynamic cursor... it means u can
change the cursor definition at run time... unless like
normal cursor where u define and declare once.
thanx..
| Is This Answer Correct ? | 26 Yes | 3 No |
Answer / srinivasa reddy k
In Oracle RefCursor is a cursor where we can change the
select statement dynamically.
First a Refcursor Variable should be declared in
Declaration Part
Refcursor Variable is like a normal variable, I.e. we can
change the value of variable at any time..,similarly now
Refcursor Variable can be changed with any sql query...
| Is This Answer Correct ? | 17 Yes | 2 No |
Answer / shaik jeelan basha
By using Ref cursor we can change the select statement
dynamically at runtime which is available in the cursor
definition based on some validation.For this we need to
define ref cursor type by using following syntax.
type <type_name> is ref cursor return <return_type>;
here <type_name> is the name of the ref cursor and
<return_type> will be the return type of ref cursor it may
be %type/%rowtype/record type/plsql table type/nested table
type/varray type.
if <return_type> is mentioned we will called it as strong
ref cursor.
if <return_type> is not mentioned we will called it as weak
ref cursor.
after this we need to define ref cursor variable by using
the following syntax.
v_variable_name ref_cursor_type_name;
then based on validations we can change the ref cursor
dynamically.
for example
------------------
declare
type ref_cur is ref cursor;
v_ref_cur ref_cur;
v_deptno emp.deptno%type;
begin
select deptno into v_deptno from emp where empno=7788;
if v_deptno=20 then
open v_ref_cur for select * from emp;
elsif v_deptno=30 then
open v_ref_cur for select * from dept;
else
open v_ref_cur for select * from salgrade;
end if;
end;
| Is This Answer Correct ? | 11 Yes | 0 No |
Answer / kishore
ref cursor is a dynamic cursor.ref cursor returns different
work area in memory.
THere are two types of cursor variable
1)week ref cursor
: if we don't include a return clause in the cursor.
2)strong ref cursor
:A ref cursor with a return clause.
| Is This Answer Correct ? | 2 Yes | 0 No |
in sql *loder how to skip the middle records ex:from 10th to 20th records i want to skip?
When you run he report you have to get only that particular organization po numbers or item number how can do it?
hi all.i am in need of some sample codes for oracle apps manufacturing interfaces.If any of u have,plz send it to me . Thank you.
If the valueset if of type –TABLE then how many tables can we attach in the valueset ?
please explain open interface import
What is Place holder Columns?
what is the database size you used?
In which tables receopt application form Appliy to field Value will come. I know one table i.e, ra_customer_trx.trx_number. Could U please any one tell me other than this except(ra_customer_trx and ar_payment_schedules_all tables). plz mentioned tables_name.Column_name.
What are the Import Programs We need to run after creating Interface table for all modules
How to link between inventory and OrderManagement.
what is pay run id ?
How to generate XML Report with out using rdf?
6 Answers BirlaSoft, Patni, UST,