WHAT IS REFCURSOR IN ORACLE ?

Answers were Sorted based on User's Feedback



WHAT IS REFCURSOR IN ORACLE ?..

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

WHAT IS REFCURSOR IN ORACLE ?..

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

WHAT IS REFCURSOR IN ORACLE ?..

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

WHAT IS REFCURSOR IN ORACLE ?..

Answer / venki

refcusor is globAL DECLARATION FOR EVERY AT THE TIME OF
OPENING CURSOR WE PASS SELECT STATEMENT DYNAMICALLY

Is This Answer Correct ?    10 Yes 1 No

WHAT IS REFCURSOR IN ORACLE ?..

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

WHAT IS REFCURSOR IN ORACLE ?..

Answer / sumanth

Ref Cursor is a Cursor, We can pass a cursor as a variable into another cursor as a parameter

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Oracle Apps Technical Interview Questions

explain p2p cycle? what are the tables used for this?

3 Answers   Accenture,


1. when we r doing interface/conversion which things u will take care to improve the perfrmonce?(except bulk collect) 2. In conversion,u r loading the data using sql*loader,I dnt want to use sql*loader,& i have millions of records,Id der any way to load the data withing fraction of time considering best performance. 3. When u r doing conversion,taht using sql*loader u r loading data into staging table,u r writing control file bt I dnt want to use sql*loader,when u r creating con prog that time can we pass all values from flat file using paramere,valuset?how? 4. In flat file u got 50 records,out of 50 ,30 records are proceesed & inserted into base table,after taht clien understood that 1 item having wrong name e.g insted of ABC he given DCE, so can we delete?hw?(client permission is der) i have lot of wrong item name randomly spreaded,can we delete it?hw? 5.after doing validation hw u will follow approach to error out records?if i want to send all the error out records to client daily,whats ur approach? 6. In outbound interface is der any way to load the data(large data-millions of records) except UTL_FILE package? 7. what is parsing? 8. In technical doc.s which section will mention?except code? 9. Do u have any idea about code depository tool? 10.whats is performance tunning,DB link? 11, How u will do RMA?

2 Answers   Cap Gemini,


while registering executable and concurent program we register both with application name|<oracle purchasing>? so my question is why we are defining in both concurent program and executable?

9 Answers  


what is back order in OM

4 Answers   IBM, Oracle,


What is request group

4 Answers   Accenture,






WHAT IS THE USE OF SKIP WHERE U WILL GIVE?

3 Answers  


Is it possible to do purchase order without requisition?

8 Answers  


what are the important table names in purchasing?

3 Answers   TCS,


What are the different components you should consider while defining a responsibility in oracle apps?

0 Answers  


Can function be overload?

4 Answers  


WHAT IS REFCURSOR IN ORACLE ?

6 Answers  


How to insert data into two tables using single control file?

3 Answers   Oracle, VTI,


Categories
  • Oracle Apps Technical Interview Questions Oracle Apps Technical (547)
  • Oracle Apps Financial Interview Questions Oracle Apps Financial (793)
  • Oracle Apps Manufacturing Interview Questions Oracle Apps Manufacturing (53)
  • Oracle Apps HRMS Interview Questions Oracle Apps HRMS (169)
  • Oracle Apps CRM Interview Questions Oracle Apps CRM (9)
  • Oracle Apps SCM Interview Questions Oracle Apps SCM (141)
  • Oracle Install Base Interview Questions Oracle Install Base (62)
  • Oracle Service Contracts Interview Questions Oracle Service Contracts (101)
  • Oracle Apps AllOther Interview Questions Oracle Apps AllOther (114)