Ref Cursors
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Ref Cursors

Hybrid View

  1. #1
    Join Date
    Jun 2001
    Posts
    10

    Red face

    Hi,

    I have a few doubts in Pl/SQL.

    1) Can a refer to a REF CURSOR in a CURSOR FOR LOOP?

    for eg :

    for i in
    loop
    ...

    end loop;

    Is this possible ??

    2) In a block like
    declare
    x %rowtype;
    begin

    end;
    Can be passed as a parameter to this block ?

    Pls clarify !!!

    Rgds,
    Sandya

  2. #2
    Join Date
    Feb 2002
    Location
    Dallas , Texas
    Posts
    158

    Hi

    hi,
    =======
    Declare
    TYPE EmpCurTyp IS REF CURSOR;
    emp_cv EmpCurTyp;
    begin
    OPEN emp_cv FOR 'select
    empno,ename from emp';
    loop
    fetch emp_cv into empno,ename;
    exit when emp_cv%notfound;
    ---
    ---
    ---
    end loop;
    close emp_cv;
    end;
    =======
    peace
    Nishant.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width