Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Closing cursors after leaving them open.
DECLARE
CURSOR xyz IS
blah blah blah;
BEGIN
OPEN xyz;
do some stuff;
CLOSE xyz;
END;
/
Oh BTW ... did you actually try to find the answer in an Oracle book or were you just guessing at the syntax?
Daniel Morgan
Galen Boyer wrote:
> When I open but don't close a cursor in pl/sql code, and then I
> try to open it again, I, of course, get cursor still open.
>
> How do I tell Oracle through sqlplus to close that currently open
> cursor?
>
> I've tried:
>
> sqlplus> close c1;
>
> sqlplus> close cursor c1;
>
> sqlplus> declare
> sqlplus> cursor c1 as blah;
> sqlplus> begin
> sqlplus> close c1;
> sqlplus> end;
> sqlplus> /
>
> sqlplus> begin
> sqlplus> close c1;
> sqlplus> end;
> sqlplus> /
>
> --
> Galen deForest Boyer
> Sweet dreams and flying machines in pieces on the ground.
Received on Wed Jan 23 2002 - 14:26:12 CST