Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Temp tables in Oracle

641631May 27 2008 — edited May 29 2008
Hello,

I´d like to know if it is possible to emulate a SQL temp table in Oracle.

Temp tables in SQL Server starts with # and they "are dropped when session which created the table is ended, if one has not dropped it explicitly"
(http://decipherinfosys.wordpress.com/2007/05/04/temporary-tables-ms-sql-server/)

In Oracle, I can create temp tables using:
create global temporary
tablename ...
on commit preserve rows

But only the data are temporary, not the table. If I logout and log in back, the table will still remain there. I´d like to have the same behavior as SQL Server.

Thank you
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2008
Added on May 27 2008
26 comments
1,189 views