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: Creating temporary tables that only exists during the query.

Re: Creating temporary tables that only exists during the query.

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/03/12
Message-ID: <350aff3a.5300551@192.86.155.100>#1/1

A copy of this was sent to "Deryl Banuelos" <banu_at_chevron.com> (if that email address didn't require changing) On 11 Mar 1998 14:02:53 GMT, you wrote:

>Long ago when ships were tall and Oracle was 6.0 my instructor showed
>us a query example that created a temporary table that once the query was
>over the
>table was gone. I have an application request for such a procedure. Does
>anyone
>know how to create a temporary table through a sql with out having to issue
>a drop command when done with it?
>Thanks in advance.

Well, that feature never existed in v6 of Oracle... but anyway... If you need a 'temp' table for the duration of a QUERY, the following syntax might help you:

select *
from ( select a, b, c

         from some_table
        where some_condition ) "My_Temp_Table"


My_Temp_Table comes into existence when the query begins, and goes away when its done.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu Mar 12 1998 - 00:00:00 CST

Original text of this message

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