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: Can I create temp table in Oracle.

Re: Can I create temp table in Oracle.

From: Sergey Beloborodov <sbelobor_at_iols.net>
Date: Fri, 30 Oct 1998 20:03:46 -0600
Message-ID: <363a6fc3.0@news1.starnetinc.com>


No You can not (unfortunately). After ALTER TABLESPACE ... TEMPORARY You can place _temporary_ segments in this tablespace _only_.

But of coarce there are a lot of tricks how to do it (depending of the requirements). One of them: make special naming conversion for these tables (to use sid and serial# from v$session in the name of this table; this is necessary). After that You are free to create those tables. To clean them up necessary to write small cron-like procedure (using DBMS_JOBS for example) to query v$session and certan segments with very simple logic: if there is table for unexisting session then drop it. Modification of dbdown or dbstart script will be helpful as well (as always will be non-zero time between calls for clean-up process). This is ganna work. Unfortunately necessary to code it in PL/SQL ;-(

Best regards,
Sergey

cljones wrote in message <36392DFC.100B_at_concentric.net>...
>Hey - yes you can -
>
>create tablespace tmp temporary
>:
>.
>
>create table temp
>:
>.
>tablespace tmp;
>
>
>
>Billy Verreynne wrote:
>>
>> news.ht.net.tw wrote in message <706l5n$8ft$1_at_ftp.ht.net.tw>...
>> >In SQL Server, we can create a session temp table.
>> >This temp table is indepandent with other session.
>> >This table will auto destory when session closed.
>> >Can I do it in Oracle?
>> >How to do it.
>>
>> Simple answer. No. It's not a feature that's directly supported by
Oracle.
>>
>> But then we can go into a whole debate as to the purpose of these temp
>> tables in SQL-Server... :-)
>>
>> regards,
>> Billy
Received on Fri Oct 30 1998 - 20:03:46 CST

Original text of this message

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