Global Temporary Table Not Dropping
597039Jan 7 2008 — edited Jan 7 2008I am attempting to implement global temporary tables and they don't seem to drop, only truncate. See below SQLPlus output.
SQL> create global temporary table hosts_gtt
2 on commit preserve rows
3 as select * from cdm_host_1;
Table created.
SQL> select count(*) from hosts_gtt;
COUNT(*)
----------
12979
SQL> exit
Now, I log back in...
SQL> select count(*) from hosts_gtt;
COUNT(*)
----------
0
It appears that Oracle truncates the table, but does not actually drop it. Is there a way to tell Oracle to drop the table as well? What I'm trying to do is create the temporary table for the session, run some SELECT's off of it, and then have it automatically drop at the end of the session.
Best Regards,
Tom