標籤:
GLOBAL TEMPORARY代表全域暫存資料表
暫存資料表的中繼資料存放區在資料字典裡面
只當第一條DML命令發生的時候才為這張表的段分配空間
暫存資料表資料的可見範圍應該是會話層級或是事務層級的
會話或者事務層級又建表時的ON COMMIT關鍵字決定,ON COMMIT DELETE ROWS代表事務層級,ON COMMIT PERSERVE ROWS代表會話層級
DDL命令只在暫存資料表與會話斷開綁定之後才可以運行
對於會話層級,當TRUNCATE命令發生時會話與暫存資料表間的綁定也就斷開了;而對於事務層級,在ROLLBACK或者COMMIT
Oracle暫存資料表的一些限制:
■ Temporary tables cannot be partitioned, clustered, or index organized.
■ You cannot specify any foreign key constraints on temporary tables.
■ Temporary tables cannot contain columns of nested table.
■ You cannot specify the following clauses of the LOB_storage_clause:
TABLESPACE, storage_clause, or logging_clause.
■ Parallel UPDATE, DELETE and MERGE are not supported for temporary tables.
■ You cannot specify the nested_table_col_properties or parallel_
clause.
■ The only part of the segment_attributes_clause you can specify for a
temporary table is TABLESPACE.
■ Distributed transactions are not supported for temporary tables.
Oracle暫存資料表(Temporary Table)