Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Newbie question
Save a step:
create my_temp_table as select * from my_table where [some condition];
If you want it to last only for the session, simply drop it:
drop table my_temp;
Joseph
In article <37dd0423.249852003_at_news.primenet.com>,
trace_at_primenet.com (Rob Calfee) wrote:
> 1) Create the mirror temp table
> create my_temp_table as select * from my_table; --This
> selects all the data into the table at the present time
>
> create my_temp_table as select * from my_table where 0=1;
> --This creates a copy of the table with no data inserted.
>
> 2) Insert data into the table from the original
> insert into my_temp_table as select * from my_table where [some
> condition];
>
> Hope this helps
>
> Rob Calfee
>
> On Mon, 13 Sep 1999 13:32:30 +1000, "Alex Daman"
> <alex_damanakis_at_exe.com.au> wrote:
>
> >Hello All,
> >
> >I want to know if there is a way to select data into a temporary
table.
> >
> >For example :
> >
> >select * from my_table
> >into temp my_temp_table.
> >
> >The temporary table should only exist for the duration of the
session. I
> >know with other database products you can do the above. I suppose I
am
> >looking for the equivalent for Oracle.
> >
> >Thanks in advance,
> >
> >Alex
> >
> >
> >
>
> Rob Calfee
> DBA
> rcalfee_at_incsystem.com
>
--
Joseph Thvedt
jthvedt_at_my-deja.com
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Mon Sep 13 1999 - 10:57:43 CDT
![]() |
![]() |