-- The data in global temporary table will get truncated at the -- end of the session. CREATE GLOBAL TEMPORARY TABLE gtt_current_transactions ON COMMIT PRESERVE ROWS AS SELECT * FROM edw_sales_transactions WHERE TO_CHAR(created_date,'yyyymmdd') = TO_CHAR(SYSDATE,'yyyymmdd');
-- This is a quick script to create a temporary/permanent table -- for data analysis/testing. Table has to be dropped by force or -- data has to be truncated to clear the table. User needs -- create/drop table privileges and adequate tablespace. Using -- PARALLEL option, parallel servers are used to create the table -- and same degree of parallelism is used in querying the table. CREATE TABLE tmp_current_transactions PARALLEL AS SELECT * FROM edw_sales_transactions WHERE TO_CHAR(created_date,'yyyymmdd') = TO_CHAR(SYSDATE,'yyyymmdd'); -- To create a blank table use a false condition (2 < 1) CREATE TABLE tmp_current_transactions PARALLEL AS SELECT * FROM edw_sales_transactions WHERE 2 < 1;
External Table Index Organized Table (IOT) Nested Table Temporary Table XML Table
73913