Need the difference between strong Ref Cursor and weak Ref Cursor examples

Oracle 9.2

It would be great if someone can help understand the differences between
1 Strong Ref Cursors(return type)
2. weak Ref Cursor (no return type)

What I read is weak ref Cursor as sys_refcursor is better to use the ref Cursor, because in the case of slider strong Ref object type that will be returned must be declared in advance. It dosent make sense to me?

I start with the examples would be appreciate for advice

Strong Ref Cursor

create the package str_pack
type sref_type is ref cursor return emp % rowtype;
SVAR sref_type;
end str_pack;

Create procedure st_proc (eid in number, c1 on str_pack.sref_type)
Open c1 to select empno, ename, sal from emp where empno = eid;

str_pack.sref_type C1;
type rec is RECORD (eid, ename varchar2 number (20), number of sal);
SheikYerbouti rec;
When exit c1% notfound;
Fetch c1 into SheikYerbouti.
end loop;
Close c1;

There could be errors in the above example but its basically to get a better understanding.

For weak Ref Cursor

procedure of the child

Create procedure child_proc (in number, c1 on sys_refcursor eid)
Open c1 to select empno, ename, sal from emp where empno = eid;

parent process

Create procedure parent_proc (recnum varchar2)
p_retcur sys_refcursor;
emp_row emp % rowtype;
child_proc (eid, p_retcur);
extract the p_retcur in emp_row;
dbms_output.put_line(emp_row.empno ||) e '|| emp_row. Ename | "wins". emp_row. SAL);
end loop;
end parent_proc;



the fundamental difference is to do with the compiling and linking of runtime type that occurs.

The he should explain a lot more detail than I could ever!


Tags: Database

Similar Questions

Maybe you are looking for

  • Serial communication is blocking my time loop

    Hello world. I need your help with my program. I use LabView2014 and a B2902A Agilent.I want to measure the current value with my instrument continuously, store the values of every second and the display of the messages received through the serial po

  • Problem of DOS window.

    I have a system with Core 2 Duo processor with OS Windows Server Standard and 4 other monitors are attached using NComputing devices. The problem is that the command prompt is not running in Mode full screen. Is there a solution?

  • When I turn on my computer, it goes to the Microsoft connection. How can I remove this item and go directly to my Start Page

    Recently had computer problems, now when I turn on my computer I had to go through Microsoft sign on the page before I can access my Start Page.  How can I remove this and have my Start Page to come once the computer has developed?

  • Replace the battery. Reference Dell 6248

    Hello! We have a set of three Dell Powerconnect 6248 switches. One of the switches must be replaced with the new one (same model). the well known "pwcnt_stacking_switches.pdf" document does not say how to replace a member of the battery, just how to

  • [EC |] SOLVED] fan edge power 2900 server

    Buongiorno,Come da telefonata del mio collega Guido Lucchi, con the present chiedo Vostra best offer by price di n. 2 di una delle ventole6 'System Board Fan' di questo modello:Model PowerEdge 2900Service Tag 8G5693JExpress Service Code 18390407311 S