之前認為 create table xxx as select * from table...不就可以馬上產生出一個臨時可以用的table嗎? 但若是同一個程式多人同時執行,將產生的table暫存用,裡面混著使用實在不是好方法,其實oracle有產生暫存Table的作法。 Oracle暫存Table是以session來產生跟刪除資料的,也就是同一個程式不同程式產生暫存Table,這些Table都是獨立的放在Temporary Tablespace,最晚每次transcation結束就會清除table內的所有資料,程式設計人員無需擔心資料的處理。 The CREATE GLOBAL TEMPORARY TABLE statement creates a temporary table.
You can create indexes, views, and triggers on temporary tables,
and you can also use Export and
Import or Data Pump to export and import the definition of a temporary table.
However, no data is exported, even if you use the ROWS option.