Amin
Amin

Reputation: 148

what is purpose of commit in temporary table (transaction scope ON COMMIT DELETE ROWS) in Oracle?

What is purpose of commit in temporary table in Oracle? Transaction scope:

ON COMMIT DELETE ROWS

Commit of current transaction or any commit that happened in current session?

Upvotes: 1

Views: 1170

Answers (1)

HashPsi
HashPsi

Reputation: 1391

ON COMMIT DELETE ROWS means that rows inserted in the temporary table within the scope of a transaction are deleted from the temporary table when the transaction is committed.

The purpose of such a temporary table allows to store data within the context of the transaction. Each transaction will 'see' only the data inserted within its own context. Data inserted by other transactions is not visible. The temporary table acts as a private data store for the transaction.

Upvotes: 5

Related Questions