Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is an Oracle View the equivalent of an SQL server Temporary Table?
"Michael Carton" <MikeC_at_erols.com> wrote in message
news:3A48DF1F.AF9D18FC_at_erols.com...
> Dave Sutton wrote:
> >
> > Hi,
> >
> > I'm new to Oracle and am getting a bit confused over trying to create a
> > temporary table.
>
> Oracle does not have the #Temp temporary table feature of SQL Server.
Good Lord! And there's me thinking that the 'create global temporary table blah (col1 char(5), col2 char(10))' statement, er, created a temporary table whose contents are cleared out automatically at the end of a transaction or at the end of a user session.
Oh.... funny thing! It *does* do precisely that. Guess you must have not read the manuals for 8.1.6 and above (your statement is only true for earlier Oracle versions).
Note that the table *definition* is NOT temporary -you can still do a describe on it weeks later... it's just the contents that are cleared out. I guess the idea is that any table needed on a temporary basis for a query is likely to be re-used (but re-populated) each time that query is run.
Regards
HJR
>
> > Can anyone tell me how to create a temporary table in Oracle...ie. used
for
> > the duration of a query only and then automatically discarded....is a
> > temporary table actually a view?
>
> Sybase and Microsoft SQL Server have this feature. Oracle doesn't.
>
> --
> MikeC
>
> Please reply to the group.
Received on Tue Dec 26 2000 - 19:32:50 CST
![]() |
![]() |