on commit preserve rows
when the session trying to do the DDL has already made a DML on the table. create global temporary table tq84_gtt(n number) on commit preserve rows; insert into tq84_gtt values (42); drop table tq84_gtt; -- ORA-14452: attempt to create, alter or drop an index on temporary table already in use truncate table tq84_gtt; drop table tq84_gtt; -- Table TQ84_GTT dropped.