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: How to Create Local Temporary Table

Re: How to Create Local Temporary Table

From: Priya <padmavathy.tr_at_gmail.com>
Date: 19 Apr 2006 23:24:39 -0700
Message-ID: <1145514279.813979.28120@e56g2000cwe.googlegroups.com>


In Oracle
A temporary table structure is visible to all session. Data is visible only to that particular session. you can have it either session specific or transaction specific.

SQL> CREATE GLOBAL TEMPORARY TABLE mytemp (a number, b number) on commit delete rows; 2

Table created.

SQL> insert into mytemp values(1,1);

1 row created.

SQL> select * from mytemp;

         A B
---------- ----------

         1 1

NOTE - This record will not be visible in other sessions.

SQL> commit;

Commit complete.

SQL> select * from mytemp;

no rows selected

you can give
on commit delete rows or preserve rows. Received on Thu Apr 20 2006 - 01:24:39 CDT

Original text of this message

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