Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Syntax of using two cursors

ANNECJun 15 2015 — edited Oct 20 2017

we are using oracle 11g 2, windows os. SQL developer.

I am trying to write a pl sql or stored procedure that needs to declare two cursors.

Just wondering the syntax about begin end

declare  Cursor c1 is

select....;

Cursor c12 is

select....;


Begin

    Begin

      For rec in c1

      Loop

     .....

      End loop;

    End ;

Begin

      For rec in c2

      Loop...

     End loop;

End;

End;


do I need a begin end for each cursor for loop, like I added in red. Or I don't need the red - begin end .



Thanks,

This post has been answered by Solomon Yakobson on Jun 15 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 17 2015
Added on Jun 15 2015
6 comments
6,968 views