Re: create temp table

From: bob sullivan (remove CORK to reply) <"bob>
Date: Thu, 27 Jan 2000 01:04:44 GMT
Message-ID: <388F9A6D.104F9804_at_home.com>


That's what I get for not knowing anything about SQL Server :)

Thanks, Sergei :)
~bob :)

Sergei Kuchin wrote:
> I believe that the original question was if Oracle has temp tables in
> the exact sense as in MS SQL. The answer is NO. The problem with
> creating a "permament" temp table is that its name is global as opposed
> to #<table_name>'s, which is local to the current session. Also,
> #<temp_tables>'s go away when the session ends. So, the quick and dirty
> solution would be to create a "permanent" work table with the same set
> of columns as in the #<temp_table>, plus a unique ID field to identify
> groups of records for multiple sessions. If only one copy of the
> #temp_table is needed, then Bob's solution works just fine.
>
> Sergei Kuchin
>
> Robert Sullivan wrote:
> > "Wafflart Sébastien" wrote:
> > > Microsoft SQL server has function wish allow to create temp table:
> > >
> > > select * from table into #table_temp
> > >
> > > Does exist a same function in Oracle database ?
> >
> > Sure, you'd just do this in SQL*Plus:
> >
> > create table <temp_table_name> as (
> > select * from <source_table_name>
> > );
> >
> > Replacing, obviously, the angle brackets and their contents
> > with the temporary table name and the source table name,
> > respectively.
Received on Thu Jan 27 2000 - 02:04:44 CET

Original text of this message