Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL Cursor question..

Re: PL/SQL Cursor question..

From: Tony <andrewst_at_onetel.net.uk>
Date: 18 Dec 2003 05:06:18 -0800
Message-ID: <c0e3f26e.0312180506.4e499294@posting.google.com>


KevJohnP <nospam_at_nowhere.com> wrote in message news:<SQcEb.32871$VV6.762072_at_news.xtra.co.nz>...
> Cursor is opened at the beginning of the for loop, navigated row at a
> time each iteration of the loop then closed at the end of the for loop.
>
> kb wrote:
> > Hi guys/gals.
> > If I have a piece of code that declares a cursor, and then a piece of code
> > that calls it in a For Loop statement,
> >
> > CURSOR xx
> > Select....etc...
> > xxx
> >
> >
> > FOR <whatever> in <CURSOR> LOOP
> > xx
> > xx
> > xx
> > ENDLOOP
> >
> > My question is, does the Cursor get run once, returning a list that the FOR
> > LOOP code then loops through, or is the cursor actually called over and over
> > again by the FOR statement?
> > Sorry for the rookie question!!! Thanks!
> >
> >

Analogous to opening, reading and closing a sequential file, really. Received on Thu Dec 18 2003 - 07:06:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US