What is GLOBAL TEMPORARY TABLE and It's significance ?

Answer Posted / pradeep

Creation of Global Temporary Tables
The data in a global temporary table is private, such that
data inserted by a session can only be accessed by that
session. The session-specific rows in a global temporary
table can be preserved for the whole session, or just for
the current transaction. The ON COMMIT DELETE ROWS clause
indicates that the data should be deleted at the end of the
transaction.

CREATE GLOBAL TEMPORARY TABLE my_temp_table (
column1 NUMBER,
column2 NUMBER
) ON COMMIT DELETE ROWS;

In contrast, the ON COMMIT PRESERVE ROWS clause indicates
that rows should be preserved until the end of the session.

CREATE GLOBAL TEMPORARY TABLE my_temp_table (
column1 NUMBER,
column2 NUMBER
) ON COMMIT PRESERVE ROWS;

Miscellaneous Features

* If the TRUNCATE statement is issued against a
temporary table, only the session specific data is trucated.
There is no affect on the data of other sessions.
* Data in temporary tables is automatically delete at
the end of the database session, even if it ends abnormally.
* Indexes can be created on temporary tables. The
content of the index and the scope of the index is that same
as the database session.
* Views can be created against temporary tables and
combinations of temporary and permanent tables.
* Temporary tables can have triggers associated with them.
* Export and Import utilities can be used to transfer
the table definitions, but no data rows are processed.
* There are a number of restrictions related to
temporary tables but these are version specific.

Is This Answer Correct ?    19 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

q)what are the validations in sql*loader

1746


how do you describe O2C along with tables

2315


what is pay run id ?

1712


Hi  Friends this is preetham, i am  searching for job on oracle apps(technical) i put 3 years fake exp, so any one  please could you help me for realtime interview  questions and 9739782164 this is my no srpsrp777@gmail.Com please guys please provide your no for contact i have a doubts i want to clarify

1576


If we have a repeated record in a table. But the repeated record how i can transfer from table to nested table?

1657






Is soa a part of oracle fusion middleware?

611


What do you understand by concurrent programs?

624


tell me the scenarios of the independent in reports

2055


Which oracle applications pl/sql standard apis you are familiar, have you used most of them?

640


tell my any difficult situtation you solved in your experience in your company?

1873


Explain oracle apps architecture.

769


can we use look up type instead of a pofile option?or valueset?is it possible how?

1791


How is choreography different from orchestration?

658


where to define interorganization transaction charges and what are the different options?

1962


Tell me how to find the custom directory in front end?

667