Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Assistance needed with creating tables in oracle.
On Sat, 11 May 2002 21:21:16 -0700, "KPK" <kpkeller_at_alltel.net> wrote:
>> > In our application, we make use of temporary tables quite a bit.
>> > How can I accomplish this same task within 8i using a temp table?
I usually declare a temporary table to match the structure of an existing table by doing:
create global temporary table temp_rows as select * from docset where 1 = 0;
(i.e. don't put any data into the temp table).
The rest that you described sounds like the behaviour of Oracle temporary tables. There is a clause ON COMMIT DELETE ROWS you might need to add depending on how long your sessions last. (I have very brief sessions to handle web requests, so I let the system clear out the table when the session ends.)
John
-- Got an Oracle database question? Try the search engine for the database docs at: http://tahiti.oracle.com/ The opinions expressed above are mine and do not necessarily reflect those of Oracle Corporation.Received on Sun May 12 2002 - 13:17:06 CDT