Temporary tables in Oracle database can be very useful tool. How to create temporary tables was described in another posting Using Temporary Tables in Oracle Database. Sometimes you need to remove existing temporary table. When you issue a DROP TABLE command you can get an error “ORA-14452: attempt to create, alter or drop an index on temporary table already in use”.
To overcome this problem you need first to empty the table. This can be done by either disconnecting all sessions that use the temporary table or by truncating the table in sessions that use the temporary table:
TRUNCATE TABLE <temp_table_name>;
Once the temporary table is empty, you can drop it the same way you do this for regular tables:
DROP TABLE <temp_table_name>;
See Also:

Add A Comment
You must be logged in to post a comment.