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

Home -> Community -> Usenet -> c.d.o.server -> Re: Global temporary tables v pl/sql tables

Re: Global temporary tables v pl/sql tables

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Wed, 10 Jul 2002 10:35:04 +1000
Message-ID: <lcLW8.31617$Hj3.95703@newsfeeds.bigpond.com>


Hi Keld,

Your English is excellent, it's my reading ability that's far from perfect !

Of course your right. Global (or public) variables, cursors and the such defined in a package header are persistent and exist for the life of the session. They're an exception to what I stated earlier.

Sorry for any confusion.

Regards

Richard
"Keld Nielsen" <keldnielsen_at_image.dk> wrote in message news:5dBW8.20$QP6.6285_at_news010.worldonline.dk...
> Hi Richard,
>
> "Richard Foote" <richard.foote_at_bigpond.com> wrote
> in message
> news:IxtW8.31036$Hj3.93881_at_newsfeeds.bigpond.com..
> .
> > Hi Keld,
> >
> > I believe you're wrong. Then again, I've been
> wrong more times than David
> > Bowie has recorded a classic tune so who knows.
>
> So have I - by the way, who is David Bowie ?
> (sorry couldn't resist :-))
>
> >
> > A PL/SQL variable exists only for the life of
> the block it was declared in.
> > Easy way to test. Create a stored procedure with
> a PL/SQL table. Call it
> > from another PL/SQL code and try to reference
> the table after the called
> > code has executed. If it works and you don't get
> a error (identifier does
> > not exist or the such) then I'm wrong. Again.
>
> You are absolutely correct, when it comes to
> procedures. But
> if the table is created in a package *outside* any
> procedures
> and/or functions it has a lifetime of a session.
>
> There are many examples on Thomas Kyte's site.
>
> English is not my native language, so I may not
> have
> expressed myself too clearly.
>
> Cheers
> Keld
> (and thanks for all of your valuable and
> very humorous contributions in this
> and other NG's :-))
>
> >
> > Cheers
> >
> > Richard
> > "Keld Nielsen" <keldnielsen_at_image.dk> wrote in
> message
> >
> news:M8iW8.157$s76.32298_at_news010.worldonline.dk...
> > > Hi Richard,
> > > Just a small comment (embedded)
> > >
> > > "Richard Foote" <richard.foote_at_bigpond.com>
> wrote
> > > in message
> > >
> news:TsgW8.30694$Hj3.92875_at_newsfeeds.bigpond.com..
> > > .
> > > > Hi
> > > >
> > > > Just to add to what Robert has said.
> > > >
> > > > A GTT is actually quite permanent, it's the
> data
> > > within it that's temporary
> > > > (either at a transaction or session level).
> > > Therefore you can potentially
> > > > access data in a GTT through many PL/SQL
> block
> > > executions.
> > > >
> > > > A PL/SQL table is temporary, period, as it's
> a
> > > memory structure that exists
> > > > only for the life of the PL/SQL block.
> > >
> > > if it's created in a package body (or spec) it
> > > will exist during
> > > the life of a session - or am I wrong here ?
> > >
> > > >
> > > > Therefore it depends on what you're trying
> to
> > > achieve.
> > > >
> > > > Horses for courses and that sort of thing.
> > > >
> > > > Richard
>
>
>
Received on Tue Jul 09 2002 - 19:35:04 CDT

Original text of this message

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