GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Oracle

 Print  |  
Question:  What is the difference between REF Cursor & Normal Cursor?



October 10, 2005 07:31:33 #1
 prathima   Member Since: Visitor    Total Comments: N/A 

RE: What is the difference between REF Cursor & Normal...
 

Ref Cursor:

ref cursor is a data structure which points to an object which in turn points to the memory location.

ex:

create or replace procedure test()

as

begin

type ref_cursor is ref cursor;

open ref_cursor as

select * from table_name;

end;

There are 2 types in this.

1.strong ref cursor:

This has a return type defined.

2. weak ref cursor.

this doesnt have a return type

normal cursor:

Nothing but the named memory location.

it has 2 types

1. explicit cursor

Need to be defined  whenever required.

2.Implicit cursor

need not defined and used by oracle implicitly in DML operation.

     

 

Back To Question