Oracle Global Temporary Tables

Share Button

Hello,

In this tutorial, Oracle Global Temp Tables will be covered. Temporary Tables keep data as private for the session that created it. Data will be kept until SESSION or TRANSACTION ends.

The usage need for temp tables is not so much but they may provide much simplicity on specific occasions.

I have used temporary tables with following requirements:

Data calculation user interfaces.
Data privacy.
Temporary tables can be used in two ways.

1. On transaction bases. Session do not need data after commit or rollback.

In this case, data will be deleted after transaction will be end with commit or rollback by the session.

2. On session bases.

Data will be deleted after session is ended, killed, became inactive.

 Fundamental Properties of Temp Tables

  • Truncate will delete data that are created by it’s own session. Other sessions will not be affected.
  • Temp tables use TEMP Tablespace.
  • Unexpected session ends will also delete data.
  • Index, View and triggers can also be used on Global Temp Tables.