Friday , June 21 2024

How To Create A Temporary Table In Oracle

In today’s article, we will be explaining on the topic of Create a Temporary tables, which provide a space to store and process data without cluttering main database structures.

– These are tables containing records specific to a session.

– Records are destroyed when the session is terminated.

– It is created using the “CREATE GLOBAL TEMPORARY TABLE” sentence.

– If “ON COMMIT PRESERVE ROWS” is used, the data is retained until the user terminates the session.

When the session is terminated, all data in the temporary table is deleted.

The data is only seen by the creating session. Other sessions cannot see it.

– By default it is “ON COMMIT DELETE ROWS”. At the end of the transaction, the data is deleted.



Leave a Reply

Your email address will not be published. Required fields are marked *