--建立臨時表
-- Create table
create global temporary table TEMPORARY_TABLE
(
str1 VARCHAR2(100),
str2 VARCHAR2(100),
str3 VARCHAR2(100),
str4 VARCHAR2(100),
str5 VARCHAR2(100)
)
on commit preserve rows;
-- Add comments to the table
comment on table TEMPORARY_TABLE
is '臨時表';
--查詢大表數據,無日志插入數據到臨時表
insert /*+append*/ into TEMPORARY_TABLE nologging
select '蘋果' str1,'紅富士' str2,'10' str3,null str4,null str5 from dual;
commit;
--查詢,使用數據
select * from TEMPORARY_TABLE;