Private Temporary Tables Oracle Database 18C

New type of temporary tables appeared in 18C called Private Temporary Tables. They are temporary database objects that are dropped at the end of a transaction or session. Private temporary tables are stored in memory and each one is visible only to the session that created it.

CREATE PRIVATE TEMPORARY TABLE .... ON COMMIT DROP DEFINITION 

or

CREATE PRIVATE TEMPORARY TABLE .... ON COMMIT PRESERVE DEFINITION
DROP DEFINITION This creates a private temporary table that is transaction specific. All data in the table is lost, and the table is dropped at the end of transaction.
PRESERVE DEFINITION This creates a private temporary table that is session specific. All data in the table is lost, and the table is dropped at the end of the session that created the table.

Continue reading