My Oracle Support Banner

The Content of a Global Temporary Table is Deleted When Another Table is Truncated From the Same Session (Doc ID 1334454.1)

Last updated on DECEMBER 20, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 8.0.3.0 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.

Goal

This document describes what happens to a Global Temporary Table when a DDL command is used in the same session.

It explains, for instance, why a Global Temporary Table is emptied when a table - even though it is another - is truncated within the same session.

Please note that this is standard behavior as also documented in
  Oracle® Database Administrator's Guide
  11g Release 2 (11.2)
  Part Number E17120-11
  http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/tables003.htm#ADMIN11633

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
 GTT (Global Temporary Table), COMMIT and DDL
 Test case


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.